An electromagnet is a type of magnet in which the magnetic field is produced by an electric current. Electromagnets usually consist of wire wound into a coil.
Electromagnets are used in various electric devices, such as electric bells, loudspeakers, telephone diaphragms, etc.
Giant electromagnets are also used in cranes to lift machinery, and bulk quantities of iron and steel.
hence, Electromagnets are used in an electric bell