Why does my desktop windows 7 turn on by itself when im not around

Go into your control panel and check your power management settings. Go into Control Panel; System; Performance Information and Tools; Adjust Power settings; Choose when to turn off -- check and make sure you have to never or like an hour
 
Is it turning on from shutdown or from sleep mode?

If it's only from sleep then right click your network adapter in device manager > properties> power management and make sure that "only allow a magic packet to wake up the computer" is checked.