Hold pressure fixed - increase temperature, density decreases decrease temperature, density increases Cold air is more dense than warm air. At the surface a parcel has the same temperature as air around it. Rising parcels of air always cool due to expansion. Sinking or subsiding air always warms by compression. I cannot overstate the importance of these last statements.
Energy is the ability or capacity to do work on some form of matter.
By doing work on something we give it energy, which it can in turn use to do work on other things. Energy exists in many forms, it cannot be created or destroyed, it merely changes form. Kinetic energy - also depends on its mass. Potential energy , represents the potential to do work. In atmospheric science, gravitational potential energy.