An electromagnet is created when an electric current produces a magnetic field. Electromagnets have multiple applications and are a popular application of magnets.
Electromagnets are often used in large metal scrapyards where large amounts of metals need to be distributed quickly and efficiently. A crane with an electromagnet on its arm is perfect for this task because the crane operator can induce a current to magnetize the electromagnet and pick up metal, and then cut the current when he wants to release the metal from the arm.
Scientists often use electromagnets for experiments because the electromagnet can be carefully calibrated in ways a natural magnet cannot, allowing the scientists to collect more accurate experimental data, allowing them a better understanding of their field.