Learning through punishment
Learning through punishment refers to the phenomenon where an unpleasant response (or punishment) following a behavior or action, makes that behavior or action less likely to occur in the future. In this case, when you get burnt (response) by touching a hot stove (behavior/ action), you learn that touching a hot stove equates pain (an unpleasant response). Therefore, you learn not to touch a hot stove again in the future.