AEB uses one or both of two sensor types, depending on the make and model.
Forward-facing camera. Usually mounted behind the windscreen near the rear-view mirror. The camera reads the road, identifies vehicles, pedestrians and cyclists, and calculates closing speed. Some makes use the camera alone for AEB (Honda Sensing, Toyota Safety Sense base versions). Camera-only AEB tends to work better in good visibility, less well at night or in heavy rain.
Front radar. Usually mounted behind the bumper, often hidden behind the manufacturer's grille badge (this is why a badge swap can knock the system out of alignment). Radar measures distance and closing speed directly, and works in conditions where the camera struggles. Most premium platforms (BMW, Mercedes, Audi) and most modern VAG cars use radar plus camera in a sensor-fusion setup.
Sensor fusion. When both camera and radar are present, the AEB system cross-checks each input against the other before triggering. This is why fusion-based AEB is less prone to false braking than camera-only or radar-only systems.
When the system calculates that a collision is unavoidable and the driver hasn't braked, it does three things in sequence: audible warning, pre-conditioning of the brake system (pads moved against the disc, brake assist primed), and full braking application if the driver still doesn't respond. On some cars the seatbelts pre-tension as part of the same sequence.