Proof that $\sqrt{5}$ is irrational
We know that by the definition of rational numbers, essentially: rationals can be written as $\frac{p}{q}$ for integers $p,q$, $q \neq 0$.
If for some choice they would have a common factor, we could divide it out, with the same quotient (our rational number) remaining, and they would have one factor less in common. As the number of common factors is finite, we have to repeat this at most finitely many times to have a choice of $p$ and $q$ with no common factors.
The proof starts by assuming we have done this step already.
More formally, you could consider the set $A:= \{(n,m) \in \mathbb{N} \times \mathbb{N}: n^2 = 5m^2\}$, and if $\sqrt{5}$ were rational, $A$ would be non-empty (as $\sqrt{5} > 0$ we can pick two positive integers WLOG.) But $\mathbb{N} \times \mathbb{N}$ is well-ordered in the order $(a,b) < (c,d)$ iff $c < d$ or $c=d$ and $a<b$. (This is just the product of the ordinal $\omega$ with itself in set theory.). Let $(n,m)$ be the minimum of this non-empty set. If $a|n$ and $a|m$ would both hold for some $a > 1$, then $(n',m'):=(\frac{n}{a}, \frac{m}{a}) \in A$ and $(n',m') < (n,m)$, contradicting minimality. This agument can easily be adapted to show any fraction has a unique (modulo the sign of $p,q$, or demand $q>0$) equivalent representation $\frac{p}{q}$ where there is no $a>1$ such that $a|p$ and $a|q$.
if $p,q$ have a common factor, just reduce the fraction and start the proof from scratch. This is a standard technique in such irrationality proofs.
We're assuming their existence, and reaching something which is absurd. This leads us to conclude that their existence is indeed impossible, whence the result follows.
The core of a proof by contradiction is the following: we assume a premise $p$. With that, we work out conclusions $q,r,s,t$ by means we know are correct, and reach a contradiction $C$, which we know is absurd. Since we are sure all the intermediate steps we took are correct, we must conclude that the premise $p$ was incorrect in the first place.