When the voltage changes from 0v to 5v the magnet in this passive buzzer, it causes the magnet inside to pull the surface of the speaker material, causing a vibration in the air that sounds like a “tic”. Control these ticks fast enough (like on an Arduino) and it sounds like music to the human ear. You can even play music!
The buzzer only makes a “tic” sound when you tell it. It’s kind of lazy! That’s how you remember this is the passive kind of buzzer. Active buzzers make a steady bzzzz sound.
This is also known as a piezoelectric speaker.