They key to making this a successful project is accurate measurements. After the old door is removed, measure across the diagonal of the door frame opening to make sure it's square. If it's not, you'll need a frame with a prehung door. If it's reasonably square, measure the thickness, height, and width of the frame opening.
Hopefully, your old door was a standard size that most builders use. Select a new door that is as close as possible in size to the existing door. None of the dimensions of the new door should be smaller than the existing door. An edge of a door can always be trimmed down, but it is extremely difficult to add to the size.
Mark the outdoor surface of the new door with a strip or two of blue masking tape on the hinge side. It might sound silly, but when working on a door and flipping it over several times on a worktable, it is easy to get mixed up on which side is which. This is particularly important so the latch edge of the door is properly beveled.
You will need the assistance of a helper to handle the door. If the door threshold is adjustable, adjust it to its lowest setting on the floor. Place the new door in the existing door frame, and have the helper hold it against the doorjamb. Using tapered wooden shims, shim it up from the threshold so it is centered in the door frame.
If your house is very old, the door frame might no longer be square. This will be apparent when the new door is shimmed and centered in the door frame. Plane a slight bit off the top of the door (called cheating) so it fits more evenly along the top. Although this step is not necessary, it looks better from indoors when the gap at the top of the frame is more uniform.
With the door securely held in the frame, mark the vertical locations of the hinges using a scribe. The hinge locations determine the finished position of the door. If you have to remove material from the width for a good fit, it should be removed from the hinge side. It's better to leave more material on the latch side in case you install a deep lockset.
When trimming the door to size, always score the cutline with a sharp utility knife. This minimizes the chances of tearing out some wood when the saw blade cuts through the wood surface. Using a circular saw, saw within about 1/16 inch of the scribed line. Remove the remainder of the wood to the scribe line with a plane.
Next, bevel the side edges of the door so it clears the frame when it swings open. The final step is to screw the hinges to the door and check that it swings freely.