Lol, this is cruel but check the basics first:
Check the speaker connection hasn't fallen out from the back of the computer.
Check the speaker is connected to usually a green plug, and not to the microphone jack on the back.
Check Volume control that everything isn't muted.
Now after that is done.
If you have XP go to Control Panel, then go to System. Go to Device Manager, and go to Sound, Video and game Controllers. And check if it recognizes your sound card. If there is a sound card recognized there, if there is an `X`on the icon. Then right click on the soundcard and click on Enable.
Even if it isn`t disabled, disable it and re-enable it.
If that doesn`work, then what might work is find the package that you purchased your computer with. Either you will have a separate CD made by Soundlabs or whatever company, or you will have a package cd from the company that sold you the package like Dell, and it will be a driver cd.
Run the cd, should be an autoplay menu that pops up, and try to find install soundcard driver.