When a gas is heated, its molecules start moving at a much faster speed and this consequently causes an increase in pressure within the container holding the gas. If the container is not strong enough, the activity of the gas molecules is likely to cause it to burst.
When any substance is heated, its molecules and atoms start moving relatively faster and this causes an increase in the space between each one of them. This increase in space is more commonly referred to as expansion. All matter, including solids, liquids and gases, expands when subjected to heat.
In some instances, when solids are heated they change their state to liquids. However, after cooling they may return back to their solid state. In the same manner, when some liquids are heated they change into a gaseous state. Gases, on the other hand, tend to expand and increase the pressure within a container instead of changing their state.
To test the expansion of gases, scientists normally inflate balloons and expose some to the sun while others are left at room temperature. The balloons that are exposed to sun tend to increase in size while those at room temperature do not change, which proves that heat causes gases to expand.