If you have double checked and find that it is connected, your sound driver may be corrupted or missing. I would check your device manager in the control panel and check sound, video and game controllers section. Right click and select update drivers in the sound device listed. Hope this helps.
I am having the same problem my sound was working on xp and vista I now have windows 7. I have realtek I have updated the drivers and plugged my speakers in by the green jack at the back of my computer but still it says my speakers are not plugged in please help