There are two types of buzzers (Active and Passive). Active Buzzers are the easiest to use, as they have internal oscillators. You only need to feed it with constant voltage and it'll play a continuous buzzer tone until you drive it LOW. It acts like a digital output device (like an LED or something) that you either turn ON or OFF. Passive Buzzers on the other hand need an AC voltage signal in order to vibrate and make sound. Therefore, it's a little bit harder to control compared to Active buzzers. But it also allows us to generate whatever note frequency we want to play.