Magnetite is an oxide of iron (as is hematite). It is not a component of ordinary rust, although it can form as iron oxidizes in a dry environment. When you see sparks from welding operations or from iron striking a hard surface (as when it is held against a spinning grinder), the sparks are due to the rapid (and exothermic) oxidation of tiny particles of iron into magnetite.
Magnetite is a natural magnet, hence the name, giving it a very nice distinguishing characteristic. Explaining the magnetism is not easy but here is a go at it. Remember, electricity produces magnetic fields just as magnetism produces electric fields. Magnetite is a member of the spinel group which has the standard formula A(B)2O4. The A and B represent usually different metal ions that occupy specific sites in the crystal structure. In the case of magnetite, Fe3O4, the A metal is Fe +2 and the B metal is Fe +3; two different metal ions in two specific sites. This arrangement causes a transfer of electrons between the different irons in a structured path or vector. This electric vector generates the magnetic field.
Magnetite is the primary oxide of iron found in meteorites (and thus presumably in asteroids).
Thermite is a mixture of powdered magnetite and powdered aluminum. When ignited, the aluminum fuel burns using the magnetite as an oxidizer, resulting in much heat, aluminum oxide (corundum), and molten iron.