Question: how buzzer works in arduino?
Answer: It's painfully easy to set up a simple piezo speaker circuit with an Arduino. Place the piezo buzzer into the breadboard, so that the two leads are on two separate rows. Using jumper wires, connect the positive lead to Arduino digital pin 8. ... Connect the other lead to the 100 ohm resistor, and then to ground.