The wax that makes up a candle’s body is made of a carbon and hydrogen compound called paraffin. As a solid, it isn’t actually very flammable and if you were to hold a flame against it, it would melt and then evaporate rather than burn.
This is where the wick comes in When you light the string at the top of the candle, the liquid wax is drawn up the wick by capillary action (the ability of a liquid to flow upwards against gravity in a small tube). It becomes so hot that it turns into a gas, which mixes with oxygen in the air and combusts.
We take for granted that a candle burns with a yellow, cone shaped flame, providing light. The reason this happens is due to a process called incomplete combustion, which produces bits of soot. This soot gets extremely hot, causing each particle to glow and produce the characteristic yellow colour.