In an electric bell, the electromagnet is switched on and off very rapidly by making and breaking the contact. When you press the switch, current flows in the coil, creating an electromagnet. The electromagnet then attracts the hammer towards the gong to hit it. When the hammer moves towards the gong, the contact opens. The circuit is broken and the current stops flowing. The coil loses its magnetism and the hammer returns to its original position, completing the circuit again. In this way, the hammer hits and lifts off from the gong repeatedly making the bell ring as long as the switch is on.
Maglev trains use magnetic levitation propulsion systems. In this system, the cable coils generate a traveling magnetic field that moves down the length of the guideway. Magnetic attraction between this field and electromagnets on the train levitates the vehicle and drags it along behind the traveling magnetic field. These trains can achieve a very high speed of 500 Kmh-1 because there is no contact friction between the train and the rails.
This type of train is a very safe mode of transport. There is no danger of derailment because the train cannot move sideway off the guideway. The braking system is also very effective. When the polarity of the traveling magnetic wave is reversed, the train is stopped without skidding. In addition, many such trains can use the same rails without fear of collision because the train can never overtake the traveling magnetic field. However, maglev transport systems have not been commercially successful because of the high cost involved in constructing new network of guideways for the train.