An
electromagnet is a type of magnet that is created by electricity. When an electric current flows through a wire, it generates a magnetic field, turning the wire into a magnet. This magnet can attract or repel other magnets and objects made of magnetic materials.
Full definition