Electromagnetic coils are used in electrical engineering, in applications where electric currents interact with magnetic fields, in devices such as electric motors, generators, inductors, electromagnets, transformers, and sensor coils.
An electromagnet works because an electric current produces a magnetic field. ... If a wire carrying an electric current is formed into a series of loops, the magnetic field can be concentrated within the loops. The magnetic field can be strengthened even more by wrapping the wire around a core.