They protect the driver and the passenger from injury in case of impact.
The front side airbags effectively protect the pelvis and chest of the driver and front passenger.
Rear side airbags protect the pelvis and chest of rear passengers.
Curtain airbags protect passengers from any impact to the side of the car.