The PCM (Powertrain Control Module) controls the sensors and other electronic components of the vehicle. Among these sensors is the OPS (Oil Pressure Sensor). Its function is to detect the amount of oil pressure in the engine, then send this information as a voltage value to the PCM. This pressure value is also transmitted to a meter in the instrument cluster, through which the driver can see the oil pressure.
When the diagnostic code P0522 OBDII is set, it is because the PCM has observed an excessively low value in the OPS sensor. If the oil pressure is really low, the engine can suffer permanent damage. Although probably the cause related to this code is an electrical problem.