killerx525 has hit the nail on the head, look for a 4pin plug or a two pin plug with space for two pins in the middle. It should be marked
Spk or spkr or speaker and is usually in line with other plugs that go to the power switch, reset switch, Activity LED, power LED. Some motherboards have one line of the connectors, others have lines of connectors. Be sure to get it on the right pins. There is no polarity.
All it does is give one beep when You turn on the computer or diagnostic beeps if there is a problem.
The fact that you have this buzzer tells me it is a home built computer or one that a local shop assembled. Usually The big name brands have a plug with all the connectors in one big plug. If You have the manual You can find the location to put it back in the manual. Alternatively If you can post the make and model of the motherboard a online manual can be located.