How were the values of this trigonmetric ratio determined? I'm reading a book that is pretty spartan about definitions. How did the book come up with the length of the sides of this triangle?

I understand the trig ratios once we have the lengths... but how were the lengths of $\sqrt{3}$, 1, and 2  determined? I think the book is assuming that the radius is 2 and that the terminal angle (unsure if this is the right word... but the angle created by the terminal side and the x-axis) is $\frac{\pi}{3}$. But how did we get the other two sides that are not the assumed radius?

One of the angles of a right triangle is $60^\circ.$ If you believe that the sum of the three angles is $180^\circ,$ then the third one is $30^\circ.$
So take a mirror image of that triangle, with the vertical side as the mirror, and put those two triangles together, and you have a triangle in which all three angles are $60^\circ.$ So all three sides have the same length, which is $2.$ One of those three sides consists of the shortest side of the triangle depicted and the shortest side of its mirror image. Therefore the length of that shortest side is $1.$
Now use the Pythagorean theorem to find the length of the other leg of the right triangle: $$\sqrt{2^2 - 1^2} = \sqrt 3 \, .$$
How you know that the sum of the angles of every triangle is $180^\circ$ is similarly simple, and you might want to look at that too.
