There is also a really nice proof using what is called reductio ad absurdum (or infinite regress), which can also be framed as a simple contradiction using the minimality property of the natural numbers.
Suppose WLOG (without loss of generality) that $$\sqrt3=\frac{u}{v}$$ for $u,v\in\mathbb{N}$ relatively prime (any positive rational number in $\mathbb{Q}$ can be expressed as a fraction in lowest terms). The reason we can assume $u,v\in\mathbb{N}$ rather than $\mathbb{Z}$ without losing the generality of our argument is because any case in the latter category furnishes one in the former by observing that $3>0$ so that $u$ and $v$ must have the same sign, and if they are negative, then $-u,-v\in\mathbb{N}$ also has the same ratio. So then $$u^2=3\,v^2.$$ But $3$ is prime and divides the RHS, hence it divides the LHS, and that means it must divide $u$ (it is a fact, known as Euclid's Lemma, that if $p$ is prime, then $p|ab \implies p|a$ or $p|b$). But then $3|u=u_0$ means that $u=3u_1$ for some $u_1\in\mathbb{N}$, and consequently,
$$9u_1^2=(3u_1)^2=3v^2 \quad\implies\quad 3u_1^2=v^2.$$
At this point, if we have not assumed that $u,v$ are relatively prime,
we continue by noting that $v=v_0=3v_1$ for some $v_1\in\mathbb{N}$, whence $u_1^2=3v_1^2$ $\implies\cdots\implies$
$$\forall n\in\mathbb{N}:u_n=u\cdot3^{-n},~v_n=v\cdot3^{-n}\in\mathbb{N}$$
which is an impossible infinite regress, also called a reductio ad absurdum (reduction to absurdity). The absurdity, impossibility, or contradiction it leads to is that, from the hypothesis, it shows that the natural numbers $u$ and $v$ are infinitely divisible, while we know that for some $N\in\mathbb{N}$ (eventually, sufficiently large), $\frac{u}{3^n}$ and $\frac{v}{3^n}$ are obviously less than $1$ and thus not whole numbers for all $n\ge N$.
A more elegant variation (avoiding these "infinite gymnastics") is to use the stipulation, which we can make without loss of generality, that $u$ and $v$ are relatively prime. Then, we can stop as soon as we deduce that $3|v$, since at this point we already knew that $3|u$.
An even more elegant variation uses the well-orderedness of $\mathbb{N}$, where we also suppose to begin with that $u$ and $v$ are minimal (or if in doubt about whether we can simultaneously require this of both variables, suppose that either $u$ or $v$ is minimal). Then, as soon as we discover our first extra factor of $3$, we already reach a contradiction.