A gas expands in response to changes in temperature and pressure. For example, an inflated balloon will increase in size when the temperture increases and it will increase in size as it goes up in to the atmosphere where the air pressure is lower. Air conditioning systems work by compressing gas and allowing it to expand within a closed system, taking advantage of temperature changes that accompany changes in pressure and volume. The gas will expand when the volume available to it is increased.
You might also be thinking about the natural tendency of a gas to diffuse, or randomly spread out into a larger area. Gas molecules are in constant, rapid motion and have frequent collisions with other gas moleucules. This causes a gas to mix with other gas molecules and spread out. If you partially fill a box with white Ping-Pong balls and put a few yellow ones in the center, then begin shaking the box, the yellow balls will eventually become evenly distributed in the box. This is what happens to gas molecules that start out concentrated in a small space.