How does lower atmosphere get heated by the earth?
Through two mechanisms, convection and thermal radiation.
Convection is similar to conduction (vibrating molecules physically interact, with energy transferred from the more energetic molecule to the less energetic one) except convection includes the idea that the fluid (in this case air) can also move and carry the heat energy with it. So cooler air molecules bumping into hotter ground molecules obtain more kinetic energy. Temperature is the average molecular kinetic energy, or T = unitconversionconstant*molecule mass*velocity squared.
The second mechanism comes from cooling ground. By conservation of energy, when an atom of earth cools off, it emits a photon to carry away the energy. We can see these photos when an iron bar is red hot, for example. We can also see the photos from cool things using night vision goggles. The photons head upwards towards outer space. If they don't hit any greenhouse gas, they escape the Earth (that's how Earth sheds the energy on the dark side that it picked up form the sun on the bright side). If they do hit a greenhouse gas like water or CO2, the photon gets absorbed and the atmosphere gets a little warmer.