In good, dry conditions, a driver needs to keep a distance of at least two seconds from the car in front. This should allow enough space for you to stop if the driver in front has to stop suddenly.
You may also be interested in these theory test questions