Fire is a source of life and comfort. Without it, there is no light to be had in the night, no heat for cooking and no warmth in evening.
Fire starting in The Lord of the Rings
Lacho calad drego morn!
"Flame Light! Flee Night!" (Children of Hurin)
We know that matches, after some fashion, were known in Middle-Earth.
Since Oin and Gloin had lost their tinder-boxes. (Dwarves have never taken to matches even yet.)
—The Hobbit, Ch 6
...Then [Bilbo] felt for matches and he could not find any at all, and that shattered his hopes completely. Just as well for him, as he agreed when he came to his senses. Goodness knows what the striking of matches and the smell of tobacco would have brought on him out of dark holes in that horrible place...
—The Hobbit, Ch. 5
Flint and steel
We also know that the ancient technique of fire starting with flint and steel was known and practiced in Middle-Earth.
They all fell silent for a while. Gimli re-filled his pipe. “There is one thing I wonder about,” he said as he lit it with his flint and tinder: “Wormtongue. You told Théoden he was with Saruman. How did he get there?”
—The Two Towers, Ch 9: Flotsam and Jetsam
Sam gathered a pile of the driest fern, and then scrambled up the bank collecting a bundle of twigs and broken wood; the fallen branch of a cedar at the top gave him a good supply. He cut out some turves at the foot of the bank just outside the fern-brake, and made a shallow hole and laid his fuel in it. Being handy with flint and tinder he soon had a small blaze going. It made little or no smoke but gave off an aromatic scent. He was just stooping over his fire, shielding it and building it up with heavier wood, when Gollum returned, carrying the pans carefully and grumbling to himself.
—The Two Towers, Ch 4: Of Herbs and Stewed Rabbit
Fire-starting in the historical age
What man knows the oldest method of starting fires? But certainly the most widespread is friction - what is commonly called "rubbing two sticks together".
By far the most common and widespread technique among "primitive", tribal people worldwide, is the hand drill. It consists of a narrow stick or "spindle", twirled between the hands and pressed down against a flat piece of wood or "hearthboard" or "fireboard" on the ground.
The wood is ground away into dust, and presently the heat of friction causes the dust to begin smouldering. This glowing ember is carefully moved to a tinder bundle and gently blown into flame.
Another way of doing this is the bow drill. It adds a bow to help twirl the spindle, and a wooden or soapstone "bearing block" or "handhold". It is easier to master than the hand drill, but historically it was not as widespread.
Certain stones, when struck together, can be made to produce sparks, and these can be coaxed into flame. Where and when this was first done, is impossible to tell. Flint, one of the better stones for this technique, has been used for making sharp tools for nearly a million years, so it's easy to imagine a discovery happening at some point. Flint is called Feuerstein, or "firestone" in German. Flint is traditionally struck against steel, but a stone that can replace the steel is called pyrite from an ancient Greek word for fire. So it certainly does have an ancient heritage.
By the time of the Middle Ages in Europe, this technique had become nearly universal in Europe and most parts of Asia.
A sharp edge on the flint is used to strike a glancing blow against a piece of steel. The sparks that arise are actually tiny pieces of burning steel. This needs to be caught in a piece of prepared tinder, which holds the spark as a smouldering ember, which can be transferred to another tinder bundle and blown into flame.
See Fire kit.
Lucifers are the forerunner of the modern match, so-called because their sulfur smell reminded people of the Biblical descriptions of Hell.
Early lucifers were splinters of pine with their tips impregnated with sulfur. These alone would not start a fire, but would catch a spark readily and burst into flame.
In time, more complex chemical mixtures were tried. The modern match as we know it wasn't used until early in the 19th century.
The Fire Piston is a device that uses a self contained compression system to generate heat. The heat builds up in the compression chamber until it meets/exceeds the combustion point of your tinder material.
The fire piston is a real historical fire making method used in South East Asia for at least 1000 years. While not described in Tolkien, they feel rather Dwarvish and are used by some of our Khazad members.
The use of a crystal or glass lens, used to focus the Sun's rays, to start fires was known - but not widely practiced - among the ancient Greeks.
In the Hudson Bay Company tinderbox from the 18th century, a lens was provided for lighting a tobacco pipe.