This story shows how to frame an interior doorway.
It is easier to build a wall flat on the floor if you have the space. Otherwise attach a top plate to the ceiling and use a level or plumb bob to position the bottom plate on the floor. Then cut individual studs and attach them with angle-driven screws or nails.
Select the straightest studs you can find for framing; you will avoid problems later. Check each stud for a crown -- a slight curve along its length -- and install all the studs with the crowns facing the same direction.
Build the wall with a bottom plate running across the doorway. This keeps the entire wall in one plane as you install it. Then you can cut the bottom plate out after the wall is installed. To make it easier to remove the bottom plate under the door, cut most of the way through it in the correct places with a circular saw.
About 2 hours
Tape measure, layout square, circular saw, handsaw, hammer, level
Measuring and marking, crosscutting, driving nails
Measure the length of the wall and determine the correct rough opening for the door.
2x4s, 16d nails, 10d nails, 8d nails
Install the regular studs and the king studs. Cut the jack studs to a length equal to the rough opening height minus 11/2 inches to allow for the bottom plate. Nail the jack studs to the bottom plate with 16d nails and to the sides of the king studs with 10d nails.
Nail one cripple to each king stud with 10d nails to hold the header firmly down on the jack studs. Attach them to the top plate with 16d nails. The infill cripples continue the 16-inch on-center spacing of the wall studs regardless of where the door is located. Space the infill cripples accordingly. Attach them with 16d nails through the top plate and 8d toenails into the header. Make sure the sides of the door opening are plumb. Tip the wall into place.