Ok the title description isn't entirely accurate but its kind awhat im asking. As we all know, the sun is constantly inputing energy into the Earth and many other planets. What i wanted to know is exactly where do planets lose this energy? I wouldn't expect that they are just constantly getting hotter and hotter and hotter (or is this true?) and reflection out of our atmosphere doesn't account for all of it so where do planets and the Earth lose their excess energy?