A pre-hung door (the door already mounted in its frame) makes installation manageable for a DIYer. Success comes down to getting the frame plumb and level so the door swings and latches properly.
Check the opening
Confirm the rough opening is the right size and reasonably square. Set the pre-hung unit in, with the frame's hinge side as your reference. The floor may not be level, so you'll level the frame with shims.
Shim plumb and level
Shim behind the hinges and along the frame so the jamb is plumb (vertical) and the head is level, checking with a level as you go. The reveal — the gap between the door and frame — should be even all around. Uneven gaps mean the frame isn't square.
Fasten and finish
Nail or screw through the jamb at the shim points so you don't bow the frame, test the swing and latch, then trim the shims flush and add casing. A long screw into the framing behind a hinge adds strength.