Quadratic residue problem on composite integers
The computation of square roots modulo a composite $N$ is hard, because a method for computing square roots can be turned into a factoring method in the following way:


Choose an element $a$ modulo $N$ uniformely at random and compute $A=a^2 \pmod{N}$
Apply the square root computation technique on $A$, get result $a'$
If $a'=\pm a$ retry, else $gcd(a-a',N)$ is a non-trivial factor of $N$


An important argument here is that the square root computation cannot systematically return $a$ because it has no way to know which of the possible square roots of $A$ you started from (they are all equiprobable since you choose $a$ uniformly and kept it secret).

If you are asking about deciding whether an element is a square modulo $N$, the situation is a bit different. First, an element $a$ is not a square modulo $N$ if its Jacobi symbol of $a$ and $N$ is not $1$. But if the Jacobi symbol is $1$, the problem of deciding whether a number is a square is believed to be hard. However, for the decision problem contrary to the computational version, I am not aware of reduction to factoring.