To prove that $\sqrt{2}$ is irrational; first, we say that $\sqrt{2}$ is either rational or irrational. Then, by assuming that $\sqrt{2}$ is rational, we reach a logical contradiction that shows that our assumption is false. So $\sqrt{2}$ is irrational.
But my problem is with the first part where we said that $\sqrt{2}$ is either rational or irrational. How do we know that $\sqrt{2}$ is either rational or irrational? For example, how do we know and prove that $\sqrt{2}$ is not undefined? How can we prove that it is either rational or irrational and is not out of these two states?
By definition, a rational number is a number that can be written as the quotient $\dfrac{p}{q}$ of two integers $p$ and $q \neq 0$. Any number that does not satisfy this is called an irrational number. So every number falls within one of these two categories. For $\sqrt{2}$, you are asked to prove that is irrational, and you prove that by contradiction. You assume the opposite, i.e. $\sqrt{2}$ is not irrational, that leaves only one option for it which is to be rational. From here, you proceed to find a contradiction.