They test a condition and operate differently based on the outcome of the test. This is quite common in real life. For instance you stick your hand out the window to test if it's raining. If it is raining then you take an umbrella with you. If it isn't raining then you don't.
All programming languages have some form of an if statement that tests conditions.
In the previous code you should have tested whether there actually were command line arguments before you tried to use them. You test the length of the args array as follows. The arguments to a conditional statement like if must be a boolean value, that is something that evaluates to true or false. Integers are not permissible.