Measure the rough opening. Standard doors are 24, 28, 30, 32 or 36 inches across. The jambs are sold accordingly. The rough opening is typically ½ inch wider than the outside width and height of the precut jamb. Jamb material is typically ¾ inch thick for an interior jamb, 1 inch for an exterior jamb. Purchase the jamb that fits your opening. Purchase a precut casing kit to trim the jamb as well.
Nail the header between the side jambs if you are using a kit. The header will fit into a routed notch on either side jamb. Flush up both front and back edges and nail through the outside of the side jambs into the ends of the header.
Stand the completed jamb in the opening. Center it from side to side. Shim the top of the jamb against the frame header. Nail or screw through the jamb header, through the shims into the frame header. Make sure the header is flush with the wall on both sides. Fasten the jamb header on either side.
Shim the side jambs at the top. Use a level to make certain the jamb is plumb front to back. Set the level on the face of the jamb inside the door frame and level it. Back the bottom of the jamb up with shims and nail or screw it through the inside face of the jamb, through the shims into the jack stud. The jack studs are the inside pair of studs directly behind the side jambs. Repeat the process with the jamb on the other side of the opening. Shim the middle of the jambs and nail to the jack studs.
Attach the top casing to the jamb header with finish nails and a hammer. Line up the side casings and nail to the side jambs. Nail through the casing into the jack studs on either side and the frame header at the top. Repeat the process with the casing on the other side of the door.