There are a few different types of brake sensors, but the most common type is the wheel speed sensor. These sensors are usually located at the front and rear wheels, and they measure the speed of the wheel as it turns. The information from the sensors is then sent to the electronic control unit (ECU), which uses it to determine when the brakes should be applied.
Most cars have four wheel speed sensors, one at each corner of the vehicle. However, some cars may have more or less depending on the manufacturer and the model. For example, some performance cars may have additional sensors to help with things like traction control and stability control.