Candles have been used as a light in the darkness, probably since Ancient Egypt. They found candle holders in tombs. Although they didn't look like the candles we use today. The first ones were more likely to be rope soaked in oils and fats or look more like torches. But they did use fat as fuel.
The candle gained popularity in the Middle Ages when they started using animal fats and beeswax for their artificial lighting. Animal fat candles weren't a favourite, they smoked a lot, had a terrible smell and were just generally unhealthy. Beeswax was a way better substance to use, but also very expensive.
In the 18th century there was a new and inexpensive substance found. Spermaceti, a wax like substance found in sperm whale heads. This new animal fat candle competed with the older candles made from sheep and beef fat but had the same unhealthy qualities.
Beeswax candles were still mostly used by the very rich and in religious settings. So, until Eugène Chevreul discovered stearin in 1823. Melting, smoking and stinking candles were for everyday use. Stearin is a white odourless waxy substance derived from animal or plant fats. Stearin candles don't smoke, give a bright flame and didn't melt faster than the wick burned. When the original twisted wick was replaced with a braided cotton one, or modern candles were born. It took a couple more years to discover paraffin wax, a substance derived from petroleum. Most of our candles are now made from a paraffin and stearin mixture.
Today more and more candles are being made from natural resources, like soy wax, rapeseed wax, beeswax, coconut wax and more. To battle against our petroleum needs and wanting to only bring natural substances into our homes.