I assume that you observed something like the following. We have the addition formulas $\sin(x+y)=\sin x \cos y+\cos x\sin y.$ $\cos(x+y)=\cos x\cos y -\sin x\sin y.$
Square both right-hand sides, and add. After a while, using $\sin^2 x+\cos^2x=1$ and $\sin^2 y+\cos^2 y=1$, we obtain $\sin^2(x+y)+\cos^2(x+y)=1.$
The fact that $\sin^2 u+\cos^2 u=1$ was explained to you in class or in your book in terms of right-angled triangles. That explanation makes sense, but only when the angle $u$ is less than $90^\circ$, or, in radians, if $u<\pi/2$.
However, even if $x$ and $y$ are less than $90^\circ$, it is possible for $x+y$ to be greater than $90^\circ$. I think you are asking why the sum of the squares is still $1$, even if we go beyond $90^\circ$.
Here is a partial answer. A "right" way to define the trigonometric functions is in terms of the unit circle, as described in one of the answers. That way, we can define the trigonometric functions uniformly for all numbers $x$.
There is also a high school way to do it. I cannot draw a picture, so you will have to draw while reading. Imagine a point $P$ in the second quadrant, say the point with coordinates $(-3,4)$. Look at the angle that we have to turn the positive $x$-axis, counterclockwise, to get to $P$. This is an obtuse angle $\theta$. We want to define what we mean by $\sin\theta$ and $\cos\theta$.
Drop a perpendicular from $P$ to the $x$-axis, meeting the $x$ axis at $Q$. Then $\triangle PQO$ is right-angled, where $O$ is the origin. Let $\phi=\angle QOP$, in the ordinary sense. Then $\phi=180^\circ -\theta$, if we are working in degrees. Define $\sin\theta$ to be $\sin\phi$, and $\cos\theta$ to be $-\cos\phi$. This makes sense in terms of right triangles, since $\phi$ is an acute angle. With this definition, it is built in that $\sin^2 u +\cos^2 u=1$ even for angles between $90^\circ$ and $180^\circ$. This is because $\sin^2\phi+\cos^2\phi=1$, since $\phi$ is an acute angle. But we have only changed a sign; squaring takes care of that.
In a roughly similar way, we can define $\sin$ and $\cos$ for angles between $180^\circ$ and $270^\circ$, and also between $270^\circ$ and $360\circ$ (in each case, drop perpendiculars to the $x$-axis, and make the sensible choice of signs.)
So four different definitions, depending on which quadrant we are in! This is a very big nuisance, since when we try to extend the usual trigonometric identities, almost every little proof breaks up into a number of cases. So just for the sake of not being driven crazy by petty detail, we are almost forced to make a more sensible definition of $\sin$ and $\cos$, such as the one based on the unit circle.
It would now be a good idea to read part of the Wikipedia article on the Trigonometric Functions.