Our professor today was showing us how to find integrals using trig subsitions.

I was wonder, in a substituation, say, like, x = sin u, how are we entitled to make such a substitution without restricting the values of x, when the sin function's values are between -1 and 1.

Yes, the values of x are restricted. Hopefully the limits of integration will be between x=-1 and x=1

You will know that the substitution is invalid when you try to determine the new limits of integration. If you have an integral that goes from x=3 to x=5,
and you substituted x=sin u, you'll know that you've made a mistake since 3=sinu and 5=sinu have no solutions.