The IDE (integrated development environment) is a tool provided for people who want to write their own little programs for smart things, but it also gives you access as a regular customer to information about the devices that are connected to your smartthings network.
One of the things you can do in the IDE is to create a “virtual device.” This is a device that doesn’t exist in the real world, but that the network will treat as though it is real. Which means you can turn it on or off from other control mechanisms, like a program, or an outside service like IFTTT, or the Amazon echo.
There are many third-party devices which have limited integration with smart things. Most commonly, they are allowed to turn switches on and off. However, for security reasons, they may not be allowed to lock or unlock locks. And they usually don’t have access to smartthings control mechanisms like modes and routines.
By using a virtual switch you have the option of providing something that looks like a switch to one of these outside services, but telling smart things to use the action of that “switch” to trigger events within SmartThings.
They can also be useful for people writing programs for SmartThings. For example, some people use them to extend control over motion sensors, so that you can “turn off” a motion sensor with a manual command in the app, something you wouldn’t ordinarily be able to do.
I know that’s a long explanation, but I hope it helps explain what virtual switches are.
As far as how you set them up, see the F a Q: