An IPS works by providing power from its internal battery when the main power source is interrupted. It detects the interruption and switches the power source from the mains to the battery within milliseconds, ensuring uninterrupted power to the connected appliances.