Framing squares are the primary tools for helping you determine whether or not you are building something to square. They are sold in a variety of sizes and materials, and the larger they are, the more accurate your measurements will be. You can place this large L-shaped tool on the corner of any frame to check if the pieces of framing are at perfect right angles or not.
String levels provide a time-tested way of ensuring that your framing is square. A small bubble level is attached to a long piece of string, which is then stretched out along the length of a framing structure. A horizontal section is then hung from a high point with a weight on the bottom and natural gravity will cause it to hang plumb. The two strings then form a natural square that you can use as a reference when building your framing.
Laser levels are the modern equivalent of string levels, and they come in a variety of sizes and models. The most basic laser levels have only the option for a horizontal or vertical line, while the more advanced models can show both vertical and horizontal lines and can shine their light for hundreds of feet, allowing for projects both large and small to be accurately constructed using modern technology.
The root of all right angles, the Pythagorean Theorem is an archaic method that can still be used to accurately determine whether or not your framing is square. In its most basic form, the 3-4-5 rule applies: Take two corners of a right angle, mark 3 feet in from the outside corner on one end, and 4 feet in from the other end, and the diagonal distance between those marks should be 5 feet if the framing is square. The numbers can be extrapolated out for more accurate measurements -- 6-8-10 and 9-12-15, for example.