It is a basic fact that gases expand when heated. The volume of an ideal gas is proportional to the absolute temperate according to the the kinetic theory of gases. In fact, substances in general expand when they are heated, whether the substance be a gas, solid or liquid.
In a solid, unlike a gas or liquid, the atoms are not free to move. The atoms vibrate about fixed positions. When a substance is heated, the atoms vibrate more vigorously and occupy slightly more space.
The change in length,of an object that is warmed or cooled depends on the change in temperatureit's original lengthand the material of which it is made. Each material has a different coefficient of thermal expansionThe equation describing thermal expansion is
The coefficient of thermal expansion is not constant. It varies slowly with temperature, but can be assumed to be constant ifis small.
Long structures such as railway tracks and pipelines can fail from buckling. In the summer a long single piece of railway track can increase in length significantly. If the ends are not free to move, if they are welded for example, the thermal expansion, introduces a compressive stress along its length. When this stress becomes too large, the rail cannot maintain its original shape and it buckles sideways as shown.