The science behind lighting a match involves a chemical reaction which is triggered by friction.
When you strike a match, the friction converts a small amount of red phosphorus on the striking surface with the phosphorus, that ignites easily.
The striking surface on a matchbox contains red phosphorus, along with other ingredients like glass powder and sand, which provide the necessary friction.
Safety matches, unlike "strike anywhere" matches, require a separate striking surface to ignite.
When the match is struck, the friction converts a small amount of red phosphorus into white phosphorus, which is highly flammable.
The initial flame of the match ignites the potassium chlorate in the match head, which releases oxygen which sustains the combustion of sulfur and other materials, which ultimately set the wood of the match ablaze.
Rubbing of the match head against a rough surface such as the striking strip on the matchbox, creates friction, the heat from the friction then converts a small amount of red phosphorus that is found on the striking surface of safety matches or in the match head of strike anywhere matches into white phosphorus.
The white phosphorus is highly reactive and ignites spontaneously in air at relatively low temperatures.
And the initial flame is crucial for starting the subsequent reactions.
The heat from the burning white phosphorus also decomposes potassium chlorate which is an oxidizing agent that is present in the match head, which releases oxygen.
This oxygen that is released then combines with sulfur as well as other combustible materials in the match head, which sustains a rapid combustion process.
The heat and flames from the burning match head then also ignite the wood of the match and allow it to continue to burn.
Lighting a match is basically a chain reaction in which friction initiates a series of chemical reactions, which lead to combustion and a sustained flame on the match.