Gas springs provide the benefits of a normal metal spring in an environment where a metal spring may be inadvisable or impossible to use. Gas springs operate by compressing and decompressing gas inside of chambers. This gas, which is usually nitrogen, acts in a manner similar to a metal spring as it expands and contracts.
When a gas spring is contracted, the gas inside the sealed chamber is compressed, which stores energy. This energy storage is similar to what occurs when a metal spring is compressed. In this compressed state, the gas attempts to expand back to its original dimensions, but it is blocked from doing so by a piston that locks into place.
When the piston lock is disabled, the gas inside the sealed chamber pushes against the piston as it expands, similar to how a metal spring expands when it is released. This expansion process releases the stored energy and eventually stops when the gas has expanded back to its original dimensions.
A common place where gas springs are employed is in an average office chair that has a variable height adjustment. When a person sits on the chair and releases the locking lever, the person's weight causes the gas inside the gas spring to compress as the chair lowers. When the person is not sitting down on the chair and the lever is released, however, the gas exerts enough force on the seat of the chair to force it back upwards.