This is done in an unexpected, and fairly technical way.
A real number is defined as a set of rational numbers (yes, a set). Such a set set must have two properties:
any element to the left of an element ($<$) is also an element, and
any element has an element to its right ($>$).
A first example is:
$$A:=\{q\in\mathbb Q:q<0\}.$$
Indeed, $r<q<0\implies r<0$, and $q<r=\dfrac{q}2<0$ and the two properties are always fulfilled. But this case is uninteresting, as it essentially redefines the real number $0$ (by notational abuse), also a rational, already know of us.
We have something more substantial with
$$B:=\{q\in\mathbb Q:q<0\lor q^2<2\}.$$
Now, bypassing the case $q<0$, we have $0\le r<q\land q^2<2\implies r^2<2$, and $q^2<r^2=\left(\dfrac{3x^2+2}{4x}\right)^2<2$. This defines a real number, which we will denote as $\sqrt 2$, and which corresponds to no rational. This is our first irrational number.
It is important to notice that these definitions only involve rational numbers and properties of rational numbers. This process is called a Dedekind cut.
Finally, a rational number is a real having an upper bound, and an irrational, having no upper bound.
The upper bound of a set is a number larger than all elements in the set and such that "there is no number in between". For the set $A$, $0$ is larger than all its elements, and no negative number is also larger than all elements in $A$. For the set $B$, you cannot find an upper bound.