This goes back to Diophantus.
Let $a,b,c$ be positive integers such that $a^2+b^2=c^2$. Then $(a,b,c)$ is a Pythagorean triple. If $p$ is a prime common divisor of $a$ and $b$, then $p$ also divides $c$: if $a=pA$ and $b=pB$, then $c^2=p^2(A^2+B^2)$, so that $p$ divides $c^2$, hence $c$. Similarly, if $a$ and $c$ have a common prime divisor, this prime divides also $b$. Thus we can assume that $a$ and $b$ are coprime, by factoring out all prime common divisors. Such a triple is primitive.
Next we can show that $a$ and $b$ are of different parity: one is odd and the other is even. They can't be both even, because they are coprime. If they were both odd, we could write $a=2A+1$ and $b=2B+1$, so
$$
a^2+b^2=4(A^2+A+B^2+B)+2=c^2.
$$
This is impossible, because $c$ must be even, so $c=2C$ and we'd get
$$
2=4(A^2+A+B^2+B-C^2
$$
which is clearly impossible.
Assume, without loss of generality, that $a$ is odd and $b$ is even. Then we can write $b=2B$ and
$$
B^2=\frac{c+a}{2}\frac{c-a}{2}.
$$
Let $p$ be a prime dividing both $(c+a)/2$ and $(c-a)/2$. Then $p$ divides the sum, which is $c$, and the difference, which is $a$: absurd. Therefore $(c+a)/2$ and $(c-a)/2$ are coprime. Since their product is a square, both must be squares.
Thus
$$
\frac{c+a}{2}=u^2,\quad\frac{c-a}{2}=v^2
$$
from which we derive
$$
a=u^2-v^2,\quad b=2uv,\quad c=u^2+v^2.
$$
Moreover $u$ and $v$ are coprime; they can't be both odd, because otherwise $a$ would be even.
Conversely, any pair $(u,v)$ of coprime positive integers, one odd and the other even, with $u>v$, gives rise to a primitive Pythagorean triple.
For $u=2$, $v=1$ we get the triple $(3,4,5)$; for $u=3$, $v=2$ we get the next one $(5,12,13)$ and so on.