At first glance the rafter table stamped into the side of a framing square can be a bit tricky to understand. But it is not so difficult once you get the hang of it. The first thing to understand is that it is based on roof pitches expressed in amount of rise (vertical) over a 12 inch run (horizontal). The table is constructed with values underneath the inch markings on the top of the square. In the picture above I have highlighted in green the rafter length for a 16/12 roof pitch. Because the rafter forms the long side of the the right triangle it needs to be 20 inches for every foot of run, or 20 feet for every 12 feet of run.
The math behind this is pretty simple. Using the pythagorean theorem we know that the square root of the hypotenuse (long side) of a right triangle is equal to the sum of the square of the sides. There a few right triangles where the math works out smoothly. a right triangle with sides of 3 and 4 will have a hypotenuse of 5. (3x3)+(4x4)=5x5. In the case of a 16/12 slope you can see that it follows the same ratio but is just 4 times bigger so the long side will be 5x4or 20.
It gets a bit more complicated when you get to hip or valley rafters. Because they are at a 45 degree angle to regular rafters they have to be longer. You can use the second line of the table to determine their length, or you could also use the pythagorean theorem again, but lengthen the horizontal dimension by 1.414 times since it is now the hypotenuse of a right triangle with even sides (look down at the roof from above to see this).
The next thing the rafter table shows is the difference in length for jack rafters. Jack rafters are those that meet either a hip or a valley rafter. They start out being the same length as regular rafters - so you use the common rafter table to determine this length - but as they work their way along the hip or valley they get shorter and shorter. The "difference in length of jacks" row shows how much shorter each one will be than the previous one based on either a 16 or 20 inch spacing.
The final thing the rafter table shows is how to cut the bevel on the ends of the angled rafters (hip, valley, jack). This is the bevel looking from above. To do this set the square along the top of the rafter with the 12 inch mark on one leg at the end point of the rafter and the "length" given by the rafter table on the other leg the edge of the rafter. Drawing a line from the end point of the rafter will give you the angle you need to cut.
In measuring rafters you need to keep a few things in mind. First is the thickness of the ridge rafter and the top plate. Neither should be included in your calculation of run. In other words, measure run from the inside of the wall and the outside of the ridge rafter. The second thing is that you don't want to have to measure and layout each rafter individually. Make one which fits and then use it as a pattern for all the others. Check the fit first at a few different places as your measurements may be a bit out or you may have a wall which is not quite square to the ridge.