You forget to use oven mitts when you go to remove that tray from inside the burning hot kitchen appliance. Upon touching your fingers to the heated metal dish, your hand yanks back with a small "ouch". You can't recall if you meant to pull back when you felt the hot metal, but the reaction is welcomed anyway. After all, if your hand had stayed there, you might have lost some skin! Still, it would be nice if the burn you DID get could just go away and stop bugging you.
Pain is our body's way of teaching us what not to do. The sting from touching the thorn of a rose will show us that we need to be more careful with that particular flower, and others that have the same appearance. The lasting effect of pain makes sure we remember this small bit of information and don't make the same mistake any time in the near future.
Not all pain is the same; It can be classified under 5 different categories.
First, and normally most frequent, is "mechanical pain". This type of pain occurs on the outside of the body. Things such as sharp objects or heavy items slamming against your body fall under this category. No matter how small, such as tripping and landing on your knee, or how large, such as falling from a roof onto cement, pain caused by force is always called mechanical pain.
Next up is "thermal pain". This would be that burn received from the tray in the oven, or when the ice breaks at a frozen pond. When your body is subjected to extreme temperatures at either end of the thermal spectrum, serious damage can happen. Heat can burn away at the body, leaving anything that was untouched by the source of the heat open to infections from bacteria in the air. Freezing temperatures may slow down your body's internal functions, and may get to the point where your brain begins to try and shut down systems as though preparing to sleep. If you are ever in a cold area, make sure not to let that happen; falling asleep in freezing temperatures could allow the cold to continue working on shutting down bodily functions permanently. This, of course, requires a gradual decrease in temperature. If it is an instant freeze, organs may not have time to die before they are shut down and stopped. It is from this idea that scientists believe freezing a living thing could allow it to be preserved over long periods of time.
Third is "electrical pain". This could be caused from sticking a fork in a wall outlet, though it is not a good idea to do test that example in an attempt to feel electrical pain. Electrical currents can travel through your entire body, overloading internal systems and causing them to shut down involuntarily. Electricity is also quite hot, causing burns. So electrical pain could be perceived as both types of thermal pain combined, though it does not work in the same way.
Fourth is "chemical pain". Examples of this kind of pain can be found in a variety of places, some perhaps unexpected. Jalapenos and other hot peppers make use of chemical pain to dissuade living things from eating it. However, that does not seem to stop a rather large quantity of humans. Various acidic objects and liquid can also cause chemical pain, which may feel much like a burn from fire.
Lastly is "visceral pain". This type of pain occurs inside the body, rather than outside as with most of the other types, and is caused by a variety of things. Bacteria is often the main source of visceral pain, eating away at a body from the inside and causing things from headaches and sore throats to heart attacks.
Some people may be born without the means to detect pain, though the condition is quite rare. It is called "congenital insensitivity to pain", and causes the signals that would be sent to the brain to signify pain to merely stop short of their destination. People with this condition tend to suffer from more broken bones, burns, cuts, and other types of pain. There is a thought... To have 6 broken bones and not even realize it.