The IRF840 is an N-Channel Power MOSFET which can switch loads up to 500V. The Mosfet could switch loads that consume up to 8A, it can turn on by providing a gate threshold voltage of 10V across the Gate and Source pin. Since the MOSFET is for switching high current high voltage loads it has a relatively high gate voltage, hence cannot be used directly with an I/O pin of a CPU. If you prefer a mosfet with low gate voltage then try IRF540N or 2N7002 etc.
One considerable disadvantage of the IRF840 Mosfet is its high on-resistance (RDS) value which is about 0.85 ohms. Hence this mosfet cannot be used in applications where high switching efficiency is required. The Mosfet requires a driver circuit to provide 10V to the gate pin of this Mosfet the simplest driver circuit can be build using a transistor. It is relatively cheap and has very low thermal resistance, added to this the mosfet also has good switching speeds and hence can be used in DC-DC converter circuits..