Thermodynamics is a part of science that deals with heat, work, temperature, and their relationship with energy. More specifically, it deals with how thermal energy is converted to other forms of energy and how matter is affected in the process.
Thermal energy is the energy we classify as heat. When something is more heated, it is less dense and has more energy. If an object is heated, its molecules have more energy, causing motion (since technically every "type" of energy is a form of kinetic energy), making the object expand, its molecules trying to get space, spreading out.
One important thing is that there is no "cold". There is only heat, just that sometimes things have less heat. Heat will always (just like matter) try to get to places where there is less heat, trying to make everything equal (in terms of heat). If an object has a lot of heat but the air surrounding it is cold, then the object will lose heat to the air.
Convection: Heat transfer in a fluid
Conduction: Heat transfer through direct contact