You must drive a safe distance behind a vehicle travelling in front of you. Following another vehicle too closely is known as tailgating. If you tailgate you may not be able to safely stop in time to avoid a collision.
You should drive at least 2 seconds behind the vehicle in front during ideal conditions.
Add 1 second extra for each 3m of trailer length—when driving a vehicle towing a trailer or caravan.
Extra points:
1. Double your following distance in poor conditions
2. Increase following distances if you're driving a heavy vehicle.