In 10.12 the setting is in Terminal > Preferences, Profiles > Advanced.
In OS X Leopard (10.5 and later)
Open Terminal.
On the menu go to Terminal > Perferences.
Open Settings > Advanced
Un-check the "Audible Bell" option. (You can also set "visible bell" which will cause your terminal to flash instead of beep)
In OS X Tiger (10.4 and earlier):
Open Terminal.
On the menu go to Terminal > Window Settings.
In the Terminal Inspector window click on the drop-down list and select Emulation.
Un-check the "Audible Bell" option. (You can also set "visible bell" which will cause your terminal to flash instead of beep)