Where do magnets come from?
Some magnets are natural (lodestone and magnetite are naturally occurring), and some magnets are man-made. The magnets made in the laboratory are usually made of a mixture of iron, cobalt, nickel and other elements. The substances are magnetized by a couple of different methods. You could move a permanent magnet in one direction across the material to magnetize it. You could produce an electric current through coils around the substance to magnetize it. And some magnets can be made from a chemical reaction (ie., certain elements will become magnetic when reacting with oxygen).
Wikipedia gives a great description of exactly what a magnet is and how it works. Some of which I’ll summarize here. [source: Wikipedia] A magnet is a material or object that produces a magnetic field. This magnetic field is invisible and causes the most notable property of a magnet: a force that pulls on nearby magnetic materials, or attracts or repels other magnets. The structure of the invisible magnetic field of a magnet is made visible by the pattern formed when iron filings are scattered around the magnet, as in the graphic above.
A permanent magnet (also called a hard magnet) is one that stays magnetized. An example is the common magnets you put on a refrigerator door. Permanent magnets occur naturally in some rocks, particularly lodestone, but are now more commonly manufactured. A soft magnet (also called an impermanent magnet) is one that will gradually lose its magnetization. Soft magnetic materials are often used in electromagnets to enhance (often hundreds or thousands of times) the magnetic field of a wire that carries an electric current and is wrapped around the magnet; the field of the soft magnet increases with the current.