An occupancy sensor is like a magic eye that can detect if someone is in a room or not. It helps save electricity by turning on lights or machines only when there are people present in the room, and turning them off when no one is there. This way, energy is not wasted when things are left on when nobody is using them. It is like when you turn off your toy cars when you are not playing with them, that way the batteries don't run out quickly!