As said above your sound driver probably got knocked out by something. Go to compaq's website, search for the model number of your laptop, there should be a page in the support section that has driver downloads for all your system's devices. Just download and install the latest sound driver.
If that fails, you will have to go into your BIOS. To get there, when you turn on your computer you should see a screen that will tell you to press Delete, F1, F2 or something like that to enter setup. Hit the appropriate key to enter the BIOS. You will have to search through the menu screens to find where it says sound device, and see if it detects a device or not. If no sound device is selected, try to select one. Failing that you can try resetting to setup defaults, that may also reenable your sound if the device got disabled in the BIOS.
If none of the above work, that probably means the onboard sound is dead, and you will have to see about getting the laptop repaired.