There are many types of magnets. Let’s look at them in some detail.
Natural magnets or loadstones are formed when molten lava containing iron or iron oxides cools and is magnetised by the earth’s magnetic force. When the lava is molten, it does not exhibit magnetic properties. But when it cools, the tiny molten particles of iron twist around to align with the earth’s magnetic poles and are trapped in this position when the iron solidifies.