To control a smart switch using Blockly programming, the user can connect the smart switch module to WizGear IoT and select the Wiz Sensor block. They can then drag the Smart Switch block onto the workspace and choose the on/off options. Running the program will activate or deactivate the relay, which can be observed through the Relay status LED on the module.