Let me see if I understand the problem correctly. When your headphones are 'not' connected, the laptops internal speaker(s) is/are not working? Is that right?
If your speakers aren't working, try the following...
NOTE: Make sure your headphones are not connected when doing this for the laptops speakers.
1. Go to "Control Panel".
2. Click on "Sound".
3. Make sure you are on the "Playback" tab.
4. Click on the device you are trying to fix.
5. Now click the "Configure" button and follow the prompts. (Be sure you also click the "Test" button.)
6. Once that is complete, click the "Properties" button.
7. When you are done with your changes, in "Properties", click "Apply" and then "OK".
8. Then click "OK", again, on the main "Sound window".