It depends on how your speakers, and headphones connect to the computer case.
If both use a 1.5mm mini jack.
And you have audio ports on the back of the case, and two on the front plug the head phones into the front ports.
Leave the speakers, and the jack plugged into the back.
Give it a try.
Right click on the windows speaker icon.
And select playback devices, right click on headphones and select set as default device.
To switch back to speakers follow the line above.
That is how you switch between speakers and headphones in windows 7 and 8.
Or between the internal laptop speakers and the headphones in the 1.5mm jack.