Meaning (1) – The literal meaning of the verb to switch on or off means to start or stop just about anything that uses electricity or needs some other form of power to be used. So, you can switch on the lights, switch on an engine, switch off the T.V.
In Context (1) – Can you switch on the heater? It’s cold in here.
Synonym – turn on or turn off
Meaning (2) – A more idiomatic meaning for switch on or off is to concentrate.
In Context (2) – As soon as the teacher starts the maths lesson, he switches off. He’s just not interested.
Synonym – to pay attention to something