Heat stroke and heat exhaustion are different conditions with different treatments, and the first is an emergency.
Heat illness is a spectrum, and the two ends need completely different responses.
Heat exhaustion — heavy sweating, weakness, dizziness, nausea, headache, cool clammy skin, a fast weak pulse, and a normal or slightly raised temperature. The person is still sweating and still regulating temperature. Treat by moving to a cool place, removing excess clothing, cooling with wet cloths and a fan, and oral rehydration solution — the correct proportion matters: 1 litre of water, 6 level teaspoons of sugar, half a level teaspoon of salt.
Heat stroke — a core temperature above about 40 C / 104 F with confusion, agitation, drowsiness, collapse, or a seizure, and hot dry skin or sweating. This is a failure of thermoregulation and it is a medical emergency with a substantial mortality rate. Call emergency services and start cooling immediately — cold water immersion is the most effective method, or ice packs to the neck, armpits and groin with wet towels and a fan. Do not give fluids to a confused person. And note the counter-intuitive part: an exertional heat stroke can occur in a young athlete in cool weather, and sweating does not exclude it.
Do not confuse heat stroke with fever. Antipyretics do not treat heat stroke and the mechanism is different.
Dehydration and electrolyte loss. In diarrhoea, vomiting, heat and prolonged exercise, the loss is water and sodium. Plain water alone does not rehydrate an electrolyte-depleted person, and drinking large volumes of plain water after heavy sweating can cause exercise-associated hyponatraemia — a serious and sometimes fatal condition. The sugar-and-salt solution is the intervention: sodium is absorbed coupled to glucose, and water follows.
Who is at risk. Infants, older adults (whose thirst response is blunted and who may be on diuretics), people on diuretics, lithium, or drugs that impair sweating (anticholinergics, some antipsychotics), people working in heat, and people in a hot car — which is lethal to children within minutes.
Cold is the mirror image. Hypothermia is a core temperature below 35 C, and the treatment is gradual rewarming with insulation and warm (not hot) drinks if the person is fully conscious. Do not rub the limbs, do not use direct heat, and do not give alcohol. Severe hypothermia needs hospital rewarming. And a person who is severely hypothermic can appear dead and still survive — resuscitation continues until they are warm.