How does energy transfer to Earths atmosphere?

it goes through a window down the hall, then shes there