A gas generator usually refers to a device, often similar to a solid rocket or a liquid rocket that burns to produce large volumes of relatively cool gas, instead of maximizing the temperature and specific impulse. The low temperature allows the gas to be put to use more easily in many applications, particularly to drive turbines. Gas generators are used to power turbopumps in rocket motors, to deploy airbags, and in other cases where large volumes of gas are needed, and storing it as a pressurized gas is undesirable or impractical.
A gas-generator cycle can also specifically refer to a way of designing a turbopump-fed liquid rocket engine, where some of the propellant is burned to drive the turbopump, and the exhaust is dumped overboard (usually through a nozzle) instead of being fed into the main combustion chamber. Many liquid rockets are designed this way, for example the Saturn V F-1 and SpaceX Merlin engines. Usually, the propellants are burned in a highly fuel-rich mix to keep flame temperatures low — O:F ratios below 0.5 are common.
Another good example is the V-2 rocket, which used hydrogen peroxide decomposed by a liquid sodium permanganate catalyst solution as a gas generator. This was used to drive the main turbopump to pressurize the LOX-ethanol propellants.