Buzzers convert a Direct Current into a buzzing noise. This can be anything from an unobtrusive warning sound to a deafening noise designed to be heard in very noisy environments.
Some are semi-mechanical. Others use an oscillator circuit to produce an AC signal. This is used to drive a transducer that converts the AC signals into sound energy.
In all cases the sound is produced by a vibrating surface that creates pressure waves in the air (sound).
The vibrating surface can be made of quartz, using the piezoelectric effect or a moving coil can vibrate a paper cone (a loudspeaker).
A bell is a special case. There is a vibrating clapper which strikes the bell.
Designing Buzzer Drivers