This video comes from the Australian equivalent of NHTSA and does a great job of explaining automatic or emergency braking.
These advanced braking systems use radar, cameras and even lasers to determine if a collision is about to happen. Automatic braking systems can recognize other vehicles and obstacles. More advanced systems can recognize pedestrians, pets and bicycles.
But, these systems are only as good as the brake pads, rotors and calipers on the vehicle. For these system to be effective, the car has to be able to brake in a straight line. If a caliper is seized or a pad is worn, braking distances will be longer.
These systems can even prevent situations where the driver has hit the gas instead of the brakes.