A smart switch uses a relay to connect or disconnect the electrical circuit of a device. It can be controlled automatically through IoT, allowing users to control devices such as lamps, fans, or household appliances without manually operating their switches.