Check 2-by-4-inch framing boards for straightness. Most walls are built with that size of framing boards. Discard boards that are bowed, warped or have any other irregularities.
Measure the straight boards accurately, and cut them precisely to the sizes necessary to build the wall. A wall's components include top and bottom boards, which are called plates and which are the wall's length. Other components are vertical wall studs, which are usually 8 feet long. The standard rule is to measure twice and cut once. Make the board ends have 90-degree angles; mark cut lines with a square, and use a circular saw or table saw to cut the lines for square ends.
Set the wall's top and bottom boards, or plates, on edge with a 2-inch side facing upward. Put the two plates together, and mark locations for studs at 16-inch intervals, starting with end studs with inside edges 1 1/2 inches from the ends of the plates. Mark a place for one vertical stud on each end of the plates.
Square the wall as you nail its components together by using a tape measure in one of two ways. Measure 3 feet along one horizontal board, 4 feet along the abutting vertical board and diagonally between those points. Adjust the boards' placement until that diagonal angle's measurement is 5 feet; that method makes the corner exactly 90 degrees. For the other method, measure corner to corner across the wall, and adjust boards' placement until the measurements are identical; that method forms two triangles with 90-degree corners.
Check the wall's corners with a framing square or speed square. Put the 90-degree angle inside the joint of the boards; square sides should run straight along each board. Use a square to check each stud as you set it in place inside the wall.