Electricity is associated with an environment or space within which it is felt. This is called the electric field. Magnetism too has a space around which it is felt. This is called the magnetic field. When an electric charge moves and varies with time, it produces a magnetic field. A magnetic field has both direction and magnitude, which is called a vector quantity. Magnetic fields are measured in units of Gauss and Tesla, named after two scientists that studied magnetism. Electricity has parameters of current and voltage. Current is measured in amperes and voltage in volts.
The electromagnet is a simple machine with a powerful concept behind it. You can produce one with a solenoid. By filling the core of the solenoid with iron wires and wrapping the solenoid with many turns of wire you have a static electromagnet. Connecting the ends of the wire to a battery produces a dynamic electromagnet that can pick up iron particles. The strength of the produced magnet depends on the number of turns of wire and the current through the wires.
The electromagnet has been developed over the centuries. It finds applications in door bells (non digital), as motors, in MRI machines and many scientific instruments. Loudspeakers and generators of all kinds use electromagnets. In industry, powerful electromagnets are used for picking up iron sheets and objects.
Electromagnets find use in many advanced scientific research equipment. One example is the superconducting magnets used in accelerators for the search of fundamental particles of matter. Protons, quarks and other particles could not have been discovered without the pioneering research of Michael Faraday on electromagnetic induction.