Inside almost all modern disposable lighters is butane, used for its practical physical properties that make it a liquid at high pressure but a gas when released into the air.
This means it can be stored as a liquid within the lighter, made of welded plastic to provide a high-pressure vessel. Decreasing the pressure by pressing a button and opening a hole allows a small amount of butane to escape in its gaseous state.
As butane is highly flammable, a small hot spark will ignite the narrow stream of gas and create a controlled flame. To create the spark, a piezoelectric crystal generates an electric charge when compressed or struck by a small hammer in the lighter mechanism.
This allows a voltage to be created between two wires and ignite the gas. Other lighters strike flint against a metal when a wheel is quickly turned with the thumb, causing friction and creating a spark.
The lighter was invented before the match. While chemist Johann Wolfgang Dobereiner invented the lighter in 1816, a true self-igniting match did not arrive until John Walker’s invention in 1827.