Remove the door from the door frame by removing the hinge pins. Set the door aside.
Pry the door trim away from the walls on both sides of the door. Remove the door frame and door jamb from the door opening. Set these aside.
Construct a frame to fit within the door opening. Use the same dimensional lumber as the existing wall. This is commonly 2-by-4-inch lumber but can vary in some circumstances. Fasten frame pieces to the wall studs exposed within the door opening along with a bottom plate fastened to the floor between the uprights of the door opening. Use 16d nails to fasten the new wall frame components in place.
Fasten an upright every 16 inches between the bottom plate and the header of the doorframe. This completes the framework that supports the new wall sheathing closing off the door opening.
Fasten wall sheathing to each side of the frame. Use the same material as the wall sheathing of the rest of the wall. These may be different materials on each side of the wall.
Finish the walls on each side of the frame. If the wall sheathing is drywall, use joint compound and tape to finish the seams between the old wall and the new wall over the door opening. Finish the nail heads with joint compound. Allow the compound to dry and sand smooth before applying another coat of mud and repeating the process.