How are sparks generated from a lighter that is used to light a gas stove?

Gas lighters work by a physical phenomenon known as the piezoelectric effect. There is a special class of materials called piezoelectric crystals, which exhibit the effect. This effect was discovered in 1880-81 by Pierre Curie who studied tourmaline, cane sugar and quartz. If a stress is applied along one axis of the crystal, a voltage develops across a transverse direction. Even the reverse effect occurs, i.e., if a voltage is applied across the crystal along one direction, the crystal deforms along the transverse direction. Now, a large number of piezo materials have been discovered and perform better than the ones studied first. Z-cut quartz crystals are well known and most frequently used piezo components. Because of their high mechanical and chemical stability quartz crystals are used in high precision oscillators in electronic circuits including quartz watches. In gas lighters piezoelectric ceramics (like lead zirconate titanate known as PZT) are normally used because of their low cost and high sensitivity. Apart from their use in gas lighters and oscillators the piezoelectric materials find extensive use in many other technological applications requiring extremely high precision movements.In the gas lighter, a spring-loaded hammer gets suddenly released and hits a piezoelectric crystal when the lever or button is presses beyond a limit. This sudden hammering causes a large stress and a high voltage, of the order of 800 volts, gets generated. The device is wired in such a way as to apply the voltage across a small air gap between two metallic points placed at the tip of the lighter. This voltage is sufficient to produce the necessary discharge or spark. This spark lights the combustible gas available in the neighbourhood.