If you are forced to brake and is hit from behind by another vehicle, the driver who hit you is at fault because he or she was driving too close to you.
The distance to the vehicle in front must always be such that no danger of collision occurs if that vehicle suddenly slows down or brakes hard.