The DelVar command deletes variables from existence, making them undefined again. This is a good way of cleaning up at the end of a program, or of making sure that a variable is undefined before you use it in a symbolic expression.
There are two commands which might be a better alternative to DelVar, however. NewProb deletes all 26 one-letter variables at once; however, it also clears things like the graph screen that you might want to see preserved. Declaring a variable as Local at the beginning of a program prevents you from needing to delete it afterwards, and it also makes sure you don't overwrite any existing variables.
Newer calculators have a DelType command to delete all variables of a certain type (provided they're not locked or archived). This is risky: you'll almost certainly delete too much. It's better to use DelVar, even if you have to list a hundred variables to do it.
Assembly programs might allow you to "hide" programs (or other variables) from the variable menu. This is actually done by marking the variable in question as "in use", the way a currently-running program is marked. As a result, you won't be able to delete a hidden variable, and trying to will give the "Variable or Flash application in use" error.
140 - Argument must be a variable name happens when trying to delete something that isn't a valid variable name.
450 - Invalid in a function or current expression happens when DelVar is used in a function.
870 - Reserved name or system variable happens when trying to delete a system variable.
970 - Variable or Flash application in use happens when trying to delete a currently running program.
980 - Variable is locked, protected, or archived happens when trying to delete a locked or archived variable.