Check your APM/ACPI settings.
If you're using Advanced Power Management, your computer is probably going into Standby or Suspend mode. In Standby, all peripherals are shut down. In Suspend, everything shuts off, or is at its lowest power state.
ACPI is slightly different.
There are Global modes and Sleep modes.
Sleep mode is technically G1, but is slpit into four sub categories, called Sleep.
S1: CPU stops processing, but power to CPU and RAM is maintained.
S2: CPU is powered down
S3: Sleep or Standby mode (see above), but RAM is still powered on
S4: Hibernation mode. Info in RAM is stored to non-volatile memory or hard drive, and then powered off.
These options can be configured by going to Control Panel -> Power Options.