Hello leen bafaqeeh,
The flag is in reality a boolean value either a constant or an attribute on an entity(GeneralSetting), when you combine this boolean with a decision split(this is basically the switch) or with an if then else statement (which can also be a switch) you can configure whether to execute your logic yes(true) or no(false).
So flag and swith are more symbolic names for this kind of set up.
hope this helps,
Good luck!