Little kids learn early not to touch hot things. Of course, when they are told not to touch they are naturally curious and usually get burned anyway. If they have experience getting hurt they are more likely to listen to the danger of future possible injury. At any rate, they learn to trust their parents good judgement. Some take longer to learn these lessons than others.
In college, I had to iron my own clothes. I didn’t listen to my mother about how to do it. I had this bad habit of ironing my shirt after I was already wearing it. One day it bit me. I mean burned me. Well, to be exact, it slipped past my top button just for a moment and seared my skin right below my Adam’s apple. It hurt like crazy for a split second. And it left a mark, to boot, that looked a lot like a hickey. It was rather funny explaining that one for the next week or two.