The rollover detection system in nonconvertible cars will sense that the car is upside down and deploy all of the airbags to protect the driver and any passengers.
In a convertible car, it will deploy all the airbags as well as bars/braces that come up through either the rear seats or another location in the back to protect all passengers once the car lands upside down.
The sensor in regular cars and SUVs is integrated with either the airbags or airbag module.
In terms of commercial cars, like semi-trucks, and large vehicles, the sensor will be separate. However, each make and model is different, so research will have to be done on your specific make and model.
How to replace/fix?
If you own a non-commercial car, you will easily be able to fix your rollover sensor by simply replacing your airbags, and resetting your airbag module; which are things you should already be doing after a rollover or major crash.
If you drive a commercial car, you will need to do research on where your rollover sensor is located and replace it. It will most likely be somewhere close to your module, so keep an eye out for it when removing that to get it to reset.
After getting the problems fixed, you might have a hard code stored in the airbag module and it will need to be reset.