Trigger when device chnages state?

How do you create a virtual switch on Smartthings? I have created switches using Google Home Helper, but not directly on the Smartthings app.