When a driver sees a hazard, the car does not stop at once. The total stopping distance is the thinking distance plus the braking distance.
The thinking distance is how far the car travels while the driver reacts, before the brakes are used. It equals speed multiplied by reaction time. It is increased by a higher speed and by anything that makes the reaction time longer: tiredness, alcohol, drugs and distractions such as a mobile phone. Doubling the speed doubles the thinking distance, so 4 m at 10 m/s becomes 8 m at 20 m/s for the same driver.
The braking distance is how far the car travels after the brakes are applied. It is increased by a higher speed, a heavier load, worn brakes or worn tyres, and by a wet or icy road, because there is less friction between the tyres and the road. Alcohol and tiredness do not change the braking distance.
Because stopping distance rises with speed, speed limits are set and drivers should leave a bigger gap to the vehicle in front in poor weather. All of these factors matter for safety.