Heat can be transferred in three ways: conduction, convection, and radiation.
Conduction is the transfer of heat through a solid material. When a solid material is heated, the particles gain energy and begin to vibrate more vigorously. These vibrating particles can collide with nearby particles, transferring some of their energy to them. This process continues until the heat has been transferred throughout the entire material.
Convection is the transfer of heat through a fluid (liquid or gas). When a fluid is heated, it becomes less dense and rises. As the hot fluid rises, it cools and falls back down, causing a circulation pattern to form. This circulation helps to distribute the heat throughout the fluid.
Radiation is the transfer of heat through electromagnetic waves. All objects emit electromagnetic waves, and the intensity of these waves is related to the temperature of the object. When an object is hotter than its surroundings, it will emit more intense electromagnetic waves, which can be absorbed by nearby objects. This absorption of electromagnetic waves results in the transfer of heat.