There are four main definitions of "sine": the right triangle definition (which is defined for angles between 0 and $\pi/2$ radians, not inclusive), the unit circle definition, the complex exponentiation definition, and the Taylor Series definition.
For the right triangle definition, "sine" of $\theta$ is defined in terms of a right triangle where one of the angles has measure $\theta$: $sin(\theta)$ is equal to length of the side opposite that side divided by the hypotenuse of that triangle. For this to be well-defined, this must be equal to some number that is always the same, given any fixed $\theta$, regardless of what triangle you use (as long as it is a right triangle with angle $\theta$).
Thus, implicit in stating that this is the definition of "sine" is the assertion that this ratio is a fixed amount, given a particular $\theta$. This can indeed be proven, given the axioms of Euclidean geometry (but is not necessarily true for non-Euclidean geometry). Suppose you have two triangle that both have one angle that's 90 degrees, and another that is $\theta$. Then the third angle in each triangle has to be 90-$\theta$. Thus, the two tirangles have all their angles congruent, and are therefore similar, and ratios of corresponding elements of similar triangles are equal.
This means that you don't need to know the side lengths, because you don't need to know what triangle you're dealing with; every triangle that satisfies the requirements gives you the same answer.
From a practical point of view, a calculator isn't going to using the triangle definition; a calculator isn't going to take out a protractor, draw a triangle, and find the ratio (and note that if you want the sine of 90 degrees, then you have two angles that are both 90 degrees, so it's not really a "triangle" in the normal sense, so the triangle definition of sine doesn't apply, yet your calculator will still return an answer). This question has answers that discuss how it can be calculated ib practice.