The first thing I'd check is whether the problem affects everything that produces sound on the computer or just one particular function.
For example, if you've got no sound on Youtube but CDs play OK, the problem is likely to relate to Youtube. (If you inadvertently click the 'Mute' button on a Youtube page, at the bottom left of the video, any attempt to play other Youtube videos will produce only silence until you un-mute the sound).
Also check all other possible 'mute' options. (e.g. on a laptop there will be a key combination, using the Fn key plus one other, which toggles the sound on and off. Perhaps you need to try that).