uln2003 relay
simple.
8051 (port pin) -----> ULN2003 (input pin)
ULN2003 (output pin) -----> Relay (- side)
Relay(+ side) ------> 12V
Also connect the ground of the 2003 to 0V (the same 0V as the 8051) and
the clamp pin of the 2003 (pin 9) to 12V.
The ULN2003 has several identical driver circuits, whichever you choose, use the appropriate input and output pins.
If the buzzer runs on 12V, you might be able to drive it directly from the 2003 and leave the relay out.
Brian.