Happened to me before.
1) If you have a seperate sound card, resit it in it's slot (remove it and replace it making sure it is properly sited in the slot)
2) Remove all sound drivers and reinstall them. Always remember to reboot after uninstalling the drivers and after installing the new ones.
3) If problem persists, changing slot for the sound card and try resseting the PCI devices in the BIOS (last attempt, small chance of working but still worth it)
4) If problem stil persists, try sound card in a different PC
If it works fine there then it is either an IRQ conflict which changing the slots and resetting the PCI devices should have solved in (3).
If it still does the same, then the sound card has probably a problem. Hence, get a new one or send the one back for repairs in case it is under warranty.
If you have onboard sound, there is not much you can do; try the drivers trick first, if nothing works get a seperate sound card.
PS: download and use the latest drivers for your sound card from the manufacturer's website.