Suppose you want to prove that $\exists x \in \mathbb{Z}$ with $a \equiv x^2 \mod b$. Write $b = \prod_{i = 1}^{k} p_i^{e_i}$, the prime factorisation of $b$.
Why is the equivalent with finding solutions to $a \equiv x_i^2 \mod p_i$? How does one apply the Chinese Remainder Theorem here?
Thanks in advance!
That is because the ring $\mathbf Z/b\mathbf Z$ is isomorphic to the product of rings $\displaystyle\prod_i\mathbf Z/p_i^{e_i}\mathbf Z$.
Thus a number is a square modulo $b$ if and only if its images in each of the factors is a square.
Furthermore, Bézout's identity is the tool to go back from the set of squares modulo each of $p_i^{e_i}$ to square modulo $b$.
Some details on the workflow: