Both of the magnetic and piezo buzzer are black
cylinder with two pins by appearance. There are a few methods can
help you to determine the buzzer you have.
1. Testing the buzzer by a magnet or another same buzzer, if attracting,
which means the buzzer you have is magnetic buzzer. On the contrary,
piezo buzzer has copper plate inside, attraction does not happen.
2. Measuring the outer diameter of the buzzer, the common outer
diameters of magnetic buzzer are 6.7mm, 9.0mm, 9.6mm, 12.0mm, 14.0mm,
16.0mm, and 25.0mm. Besides these diameters, others are all piezo
3. Looking inside the buzzer sound hole, if you can find a yellow
inner copper plate in a large size buzzer, it must be a piezo buzzer.
However if you find a white iron color plate, then you cannot say
it is a magnetic buzzer, because some piezo buzzers are also made
with alloy plates.