An electromagnet is a type of magnet in which the magnetic field is produced by an electric current. It consists of a coil of conductive material, often copper, which becomes magnetized when current flows through it. Electromagnets are used in many technical contexts, including electric motors, generators, and transformers.