When a child is ~12 months old, and learning to walk, they will likely be fascinated by fire. So fascinated that they run directly into it. The only protection the child has in this case, is constant supervision and prevention from a parent.
As the child progresses to 2-3 years old, they begin learning to talk. They will learn the word hot. The parent can then associate the vocal word "hot" to something that is hot. A parent may also associate a familiar word "ouch" with "hot" to communicate to the child a consequence of the danger. This does not alleviate the need for supervision, since the child may charge the fire anyway. Further, the child is still developing neurologically and so may simply stumble into the fire, despite comprehending the parent's warnings.
Whatever the case, the child has not yet learned what hot means. They have not felt it.
A parent may safely introduce "hotness" to a child. For example, by supervising while allowing a child to briefly to