As a little kid, I used to be fascinated by that until my senior secondary school, then I realized it wasn't rocket science. It is a combination of physical and chemical activities.
The match head contains powder glass, potassium chlorate and sulphur while the striking surface is made of powder glass, red phosphorus and sand. When a match stick is struck against the surface, the sand and powder glass cause friction and heat. This further converts the red phosphorus to white phosphorus - a volatile chemical that ignites.
The heat produced also breaks down the potassium chlorate thereby releasing oxygen. This reaction fuels It and keeps the fire burning a some moment.