Doorbells are electromagnets. Electromagnets are coils of wire wrapped around a piece of magnetic metal. When you press the bell, it completes the electrical circuit; the magnetic field is used to power the bell sound.
the circuit closes when the button is pressed. The electromagnet moves the contact arm. When the arm moves, it interupts the current, stopping the electromagnet. If held down, the chime repeats over and over.
The energy moves from the battery, through the first wire to the row connecting to the corner of the button. The energy can only move through it if the button is pressed. It allows the energy to continue through the buzzer, making the sound.