Circuit with a piezo buzzer

I'm doing a little project right now that involves making sounds with arduino. Right now I'm going to try this circuit - https://programmingelectronics.com/an-easy-way-to-make-noise-with-arduino-using-tone/, but I'm not familiar with electronics, so I don't understand why there's a resistor between buzzer and GND.

The piezo is similar to a capacitor (acts like a short to AC) you have to limit the output pin current with a resistor.

I don't really understand the concept of short circuit. Is it the case when the voltage that comes from + is almost the same that gets to -? I.E. a circuit with nothing but a wire connecting + and -, or a circuit with elements with low power consumption?

Think of a short as placing a wire across the pos and neg terminals of a battery. The wire will allow too much current to flow, the battery will get hot and the battery and/or wire may start smoking.

If you place a wire from an output pin on the Arduino to GND you will damage the Arduino controller.

If however, you add a resistor to the output pin circuit, you limit this output current to a safe level.

.

The words "piezo" and "buzzer" are confusing if they are put together.

A piezo (flat disc) can be used as microphone and speaker, so ok to use with the tone library.

A buzzer (taller, with a + printed on it) makes sound by itself if you connect it to a DC voltage. A DC buzzer can't be used as a speaker for the tone library. Leo..