Don’t leave it to the last minute! Give yourself enough time to think about what’s coming up on the road ahead. The safest way to brake is early and lightly, then gradually braking more firmly until you stop.
Only a fool breaks the 2 second rule! In dry, clear and non-hazardous conditions you should allow at least 2 seconds between your car and the car in front, this will allow time for you to brake safely.
Think about the weather conditions too, on wet roads you should double the usual distance and even more on icy or snow covered roads.