Thermal expansion simply means that a substance will expand or get bigger when the temperature is increased. On the other hand, a substance will contract or shrink when it is cooled.
The substance expands because the atoms in the substance move farther from each other when the substance is heated.
The substance contracts because the atoms move closer to one another when the substance gets colder.
You can loosen a tight metal jar lid if you put it under a stream of hot water. Both the metal jar lid and the glass of the jar will expand. However, since the atoms in the metal move farther apart than those in the glass, the lid expands more than the jar. As a result, the lid is loosened.
Fill a pot all the way to the top with water and bring it to boil. The water will start spilling on the oven as a result of thermal expansion. A vehicle engine is never filled all the way to the top with oil.
This is done on purpose to give the oil room to expand when the temperature of the engine rises.
You have heard people saying that it is best to put gas in your car whenever it is cold. It is because gas shrinks when it is cold and expands when it is hot. Since gas shrink when it is cold, it will occupy less space in your tank. If you fill your tank while it is cold and you don't go anywhere with your car, the gas may overflow your tank when the temperature rises.
Since materials have a tendency to expand or shrink, this must be taken into consideration in the construction of structures and devices of all kinds.
For example, long steel bridges often have expansion joint, also called movement joint as illustrated below.
This expansion joint will allow the the bridge to move freely back and forth with the rise and fall of the temperature.
Rivets and other fasteners used to put parts of an airplane together are often cooled in dry ice before insertion. It is done this way so they can expand to a tight fit when the temperature rises.