Proving a number is irrational may or may not be easy. For example, nobody knows whether $\pi+e$ is rational.

On the other hand, there are properties we know rational numbers have and *only* rational numbers have, and properties we know irrational numbers have and *only* irrational numbers have. If we can show a given number have one of the former, we can guarantee it is rational; if we can show it has the latter, we can guarantee it is irrational. There are also properties that rational numbers, among others, have; if we can prove a given $x$ does *not* have such a property, then it cannot be rational. Or there are properties that only *some* rational numbers have (like terminating decimal expansion). If you number *does* have such a property, then it *must* be rational. Etc.

And sometimes it is possible to simply prove it "directly."

First: remember that the definition of "rational number" is *not* about its decimal expansion, but rather:

A real number $r$ is **rational** if there exist integers $a$ and $b$, $b\neq 0$, such that $ \displaystyle r= \frac{a}{b}$.

It is a *consequence* of this definition that, if you write down a decimal expansion for a rational number, then it will be *periodic* (it will eventually repeat, perhaps with $0$s).

So it's not about numbers "going on to infinity". Or about decimal expansions. It's about being able to express the number as a *ratio* of two integers (hence "rational": a ratio).

(As a matter of fact, "most" numbers have non-terminating decimal expansions; not only do all irrationals have nonterminating decimal expansion, but a rational number $\frac{a}{b}$, with $a$ and $b$ relatively prime, has terminating decimal expansion if and only if no prime other than $2$ or $5$ divides $b$).

For example, the ancient greeks proves that $\sqrt{2}$ was not rational by contradiction:

Assume that $\sqrt{2}$ is rational, and write $\sqrt{2}=\frac{a}{b}$ with $a$ and $b$ integers. By cancelling, we may assume that $a$ and $b$ are not both even (if they are, we can simply keep cancelling powers of $2$ until one of them is not). Squaring we get that $2 = \frac{a^2}{b^2}$. Then $2b^2=a^2$. Since the left hand side is even, $a^2$ is even; but for a square to be even, we must have $a$ even. So $a=2k$ for some $k$. That means that $2b^2 = a^2 = (2k)^2 = 4k^2$. From $2b^2 = 4k^2$ we conclude that $b^2 = 2k^2$, so $b$ must be even. But this contradicts our assumption that $a$ and $b$ were not both even. The contradiction arises from assuming $\sqrt{2}$ is rational, therefore $\sqrt{2}$ is irrational.

We did not need to find the decimal expansion of $\sqrt{2}$, or prove it never repeated; we simply proved that it is impossible for $\sqrt{2}$ to be expressible as a ratio of two integers.

Likewise, one can show that for every positive integer $n$ and every positive integer $m$, $\sqrt[m]{n}$ is either an integer, or it is irrational (the proof uses either unique factorization of integers into primes or something similar).

Here's another example of something we know about rationals and irrationals: it is a corollary to a theorem of Hurwitz from 1891:

If $x$ is irrational, then there are infinitely many integers $p$ and $q$, $q\neq 0$, with $p$ and $q$ sharing no common factors other than $1$ and $-1$, such that
$$\left| x- \frac{p}{q}\right| \lt \frac{1}{\sqrt{5}q^2}.$$

If you can show that for a given $x$, the inequality has only finitely many solutions, then the conclusion is that $x$ must be rational.

Likewise, there are theorems that tell us about *algebraic numbers* (roots of polynomials with integer coefficients). Every rational number is algebraic (since $\frac{a}{b}$ is the root of $bx-a$); if you can prove a number is *not* algebraic, then it must be irrational. For example, one can prove that $e$ and that $\pi$ are transcendental, but showing that they cannot be roots of any polynomial with integer coefficients; in particular, they cannot be rational either.

So, most of the time we aren't looking at the "decimal expansion" to decide if the number is rational or not (thought *sometimes* we do, for some very special numbers like the one Austin Mohr mentions). Instead, we look at the *properties* the number has to see if it has the properties of a rational number or of an irrational number.