Those big MRI machines made me wonder about the construction method of a magnet.
There are some natural magnets. For example, the mineral magnetite is magnetic, and is found in lodestones.
If you have a magnet, you can stroke a piece of metal (not all metals, but some) and magnetize it; that is, turn it into a magnet. You line up the magnetic domains when you stroke it so it has a net magnetic field.
If you put a radio receiver nearby tuned to the right frequency, you can hear the domains flip as you do this; this is called the Barkhausen effect.
There are also electromagnets. Passing an electric current through a coiled wire wrapped around the right kind of metal (called a shunt) produces a magnet.
This is the kind of magnet one finds in MRI machines.