Windows only allows one "default audio playback device" (HDMI OR Speakers). Thus if you have an HDMI cable connected it will (in most cases) automatically default to the HDMI. If the HDMI is unplugged it will default back to the "Speakers" (your sound card).
Otherwise, if you have HDMI connected you must manually switch the playback to the Speakers.
There was a 3rd party software program that would allow both in Windows XP. I don't think its compatible with Windows 7 (or Vista or Windows 8) as some of the audio functions are handled differently than XP.