Electric bell is an example of an electromagnet.
Bar magnet
An electromagnet is a type of magnet in which the magnetic field is produced by an electric current. The magnetic field disappears when the current is turned off. Electromagnets usually consist of a large number of closely spaced turns of wire that create the magnetic field. In electric bell we use electromagnets.