Lay your top plate against, and at right angles to, the vertical studs of the wall while it's being constructed on the ground.
Line up the end of the top plate board with the outer side of the stud located at the far right edge of the wall. Place a carpenter's square at the angle where the two boards meet, and ensure that it is even with the square at 90 degrees. Nail the top plate to the stud with two 10D nails.
Line up the next stud to the left against the lower edge of the top plate. Check the measurements of the stud and ensure that it intersects with the top plate at the same distance from the previous stud on the bottom plate. Square the boards with your carpenter's level and nail them together.
Continue working towards the left, measuring and squaring each stud in succession. When you've completed attaching all the studs to the top plate the wall will be ready to be raised into position.