The lighter was actually made before the match. The first lighter was made by a German chemist in 1816. His name was Johann Wolfgang Dobereinr. It was called a lamp and it was a cartridge that was filled with hydrogen and was triggered by a platinum catalyst. The lamp was not at all safe to use. It is often referred to as a flint gun.
In 1826 the first match, meaning a stick of wood that you needed friction to light was invented by John Walker from England. His variety were not terribly reliable. Then they moved on to using white phosphorus, but that was highly toxic. The lighters may have been the best choice all the way around.
The most common type of lighter used now is a butane lighter. They can come in a disposable option or a refillable choice. These are the kind of lighters that are used for smoking, barbecue lighters, and to start general fire. Most emergency car kits or 72 hour emergency kits have some form of lighters and matches. Most avid hunters carry both.
The mechanics of the modern lighter are fairly simple. There is a wick soaking in the butane. The wick can not be seen. It is the apparatus that sustains the flame once the lighter is ignited. When you press down the button on the lighter it begins a chain reaction. As button is pressed it opens valve that releases the gas and at the same time a tiny piece of metal strikes against a flint creating a spark.
The flame requires both oxygen and fuel to ignite. The flame at the base will be a blue color as it burns the butane and then go up to an orange flame. At the base 100% butane is burning. The great things about lighters is that when your finger is taken off the button the process stops immediately. A match can be tossed aside and the fire is still going. Technically, this makes the lighter a safer choice.
In a society where many are striving to be more green, there is the advantage of using a butane lighter that is refillable. The process of refilling the lighter is simple. Located on the bottom of the unit is a refill hole. Butane can be purchased at any smoker shop and even some gas stations and places that sell lighters. The nozzle fits right down in the hole. Squeezing the can allows the butane to flow into the lighter. If you listen closely you can hear a light hissing sound. When that sound stops the lighter is full.
So now you know how the lighter works and a little bit of history.