A solenoid-coil bell ringer.
Above figure is a simplified diagram of a bell ringer, also called a chime. The main functional component is called a solenoid, and it is an electromagnet. The core has a hole going along its axis. The coil has several layers, but the wire is always wound in the same direction, so that the electromagnet is powerful. A movable steel rod runs through the hole in the electromagnet core.
When there is no current flowing in the coil, the steel rod is held down by the force of gravity. When a pulse of current passes through the coil, the rod is pulled forcibly upward so that it strikes the ringer plate. This plate is like one of the plates in a xylophone. The current pulse is short, so the steel rod falls back down again to its resting position, allowing the plate to reverberate.