The Pythagorean Theorem is a^2+b^2=c^2
with a and b the length of the legs of the triangle and c as the hypotenuse, or the longest side. It has variations too, like
a^2+b^2>c^2 or a^2+b^2<c^2
These three are used to figure out, with given any angles, whether a triangle is right, obtuse or acute (respectively) by plugging in the lengths given. If
a^2+b^2>c^2 or a^2+b^2<c^2
holds true, than the triangle is obtuse or acute. But if
a^2+b^2=c^2
holds true, than the triangle is right, and it has to be right. You are probably more familiar with this version:
a^2+b^2=c^2
. It is only true for right triangles, because of the unique relationship among the three side lengths, which never holds true for any other type of triangle. That is why this variation of it (with the = sign) can only be used for right triangles and right triangles only. Right triangles are the only triangles that make the theorem true.