Heating your bathroom mirror with a heated mirror pad, also known as demisters, prevents water condensing on the mirror surface.
These typically wire to the bathroom mirror light circuit, so when the light is on, so is the Mirror heater.
Originally used to defrost / demist the rear windows of cars back in the 60's an enterprising PCB manufacturing company based in the South of England copied the principle by making a small printed circuit board (like that found in a Tv or radio) with a snail pattern of copper. This heated when a current was passed through it. When this was glued to the back of a Mirror the first Mirror Demister was made. Like many British inventors, he thought the idea would never catch on, so it wasn't patented! Now there are over 10 differing designs of Mirror heater, including the Foil, wire and Carbon inpregnated mat, but all work on the principle of turning electrical current into heat.
Electrical regulations in the UK demand that if the Mirror heater pad is to be located within the Shower cubical or above the bath then it must be run from a SELV (safe extra low voltage) supply. These are also know as 12V (or 24V for foil types). A transformer is wired to the lighting circuit (away from the Bath or Zone 1 area) and only the SELV (12V) wires are supplied to the heater. All electrical devices in a Bathroom must be IP44 or better.
Don't expect your mirror to become hot as the mats are desgined to gently warm the mirror to 10-15°C above the ambeit. This prevents the mist from forming, it won't boil it away!