Configuring the OS X audio settings is quite simple and should be pretty straightforward; however, there are times when odd mishaps can occur and the system will not play sounds, or will not play alerts. In addition there may be instances in which it will only play these sounds through odd sources, such as only through the internal speakers, only through headphones, or only through a third-party audio device.
The first step if audio stops working is to restart the system to see if a basic reload of the current configuration will fix the problem. However, if this does not work then there are a number of options you can try if your system will not play sounds as expected:
Check volume controls
Go to the Sound system preferences and check that the system volumes are at appropriate levels. In OS X there are two default volume settings: the first is the global "Output volume" setting for the system, and the second is the "Alert Volume" for sound effects. If the Alert volume setting is too low, then you may not hear warning and notification sounds.
In addition to the controls in the System Preferences, go to the Applications/Utilities/ folder and open the Audio MIDI Setup utility. In this utility you can check some specific settings for various audio devices, including the bit rate, bit size, number of channels, mute status, and clock sources. In addition you can adjust the speaker configuration for stereo or multichannel setups. Lastly, if you have any aggregate audio devices (a virtual device that combines multiple individual devices), try removing them to see if the individual aggregated components work independently. Sometimes timing settings or differences in sampling rates and supported bit depths in devices may result in incompatibility when an aggregate device is used.
The system's PRAM holds the volume setting that is applied at start-up. While this should be set whenever you change the system volume, if there is corruption in this setting then it may not store new values or properly set the system's volume. To clear this problem, reset the system's PRAM.
Check cabling and jacks
If you use external sound devices such as speakers or headphones, be sure to check the cabling, as a fault in the cable will clearly prevent audio from working properly. Try new cables if you have them. In addition, check the audio jacks for the system by opening the Sound system preferences and going to the Output tab. Then insert an audio cable into the system, unplug it, and monitor the name of the built-in sound output device. When a cable is plugged in the name should change from "Internal Speakers" to "Headphones" or something similar.
If there is no name change, then try repeatedly inserting and removing the cable. This will hopefully dislodge the small switch in the jack that's responsible for switching the output device to external speakers or headphones when they are plugged in. You may also have luck using a pin or paperclip to massage the switch, but take extra care when doing this.
Check third-party audio devices
Try shutting down your system, unplugging your third-party audio device, and then starting the system back up to check their function. If the system outputs sound without the device enabled then you will need to check with the device manufacturer's support for troubleshooting options. Some basic approaches would be to try reinstalling or updating supplied drivers, changing USB/Firewire ports or expansion slots being used, and otherwise resetting the audio device.
If you boot the system into Safe Mode, third-party device drivers will not load, and you should be able to play system sounds to determine if the Core Audio system components are properly set up.
Remove relevant plist files
The sound system's settings are stored in several property lists, which are in the following locations in the filesystem. Remove them from these locations (such as by putting them on the desktop) and restart the system to see if freshly created copies enable the sounds to work again. You may have to adjust some settings from their default values after doing this.
/Macintosh HD/Library/Preferences/Audio/ (entire folder)
Core Audio problems?
The system uses the coreaudio daemon to manage sound, and if the daemon cannot start up properly then the system will not be able to play sounds. Open Activity Monitor to see if you can find a process called "coreaudiod" that is running under the special user account "_coreaud." If the process is not running or is missing, then check the system logs (in the Console utility) and search for coreaudiod to see if there are any errors pertaining to it.
At the very worst you might need to reapply the latest Combo updater for your system or reinstall OS X (a basically seamless process for Snow Leopard) to clear the issue, though before you do this you might contact a technical support resource for interpretation of the errors in the system logs.
Beyond system settings, you might have troubles with an individual application not properly using sound devices or playing sounds. The options available for troubleshooting will depend on the program, but one global option you can try for most applications is to locate and remove the preference file associated with the program, especially if the program's audio features work properly in other user accounts on the system. Open the /username/Library/Preferences/ folder and locate the preference file for the application (which usually uses the naming scheme "domain.developer.applicationname.plist"). Remove the file and relaunch the program to see if the problem has been fixed.
Beyond preference files for applications, check for any audio plug-ins that the application uses. These can be global audio components, or VST, MAS, or HAL plug-ins that have been installed in their respective directories in the /Macintosh HD/Library/Audio/Plug-Ins/ or /username/Library/Audio/Plug-Ins/ folders, but there also may be application-specific plug-in locations. Remove the plug-ins from these locations and try the audio program again, to see if a more basic setup will allow sounds to work again.