Set a wood block against the door frame near the damaged trim. With this block as a leverage point, use a pry bar to lift the damaged trim away from the exterior wall of the home.
Measure the pieces of damaged exterior trim to determine how much replacement material you need. If you were able to remove the trim without breaking the pieces apart, you can use the existing pieces as guides when cutting the replacement trim.
Cut the pieces of replacement trim with a miter saw according to your measurements or templates from the previous step. If you are replacing a corner, cut the end of the two segments of trim at a 45-degree angle so they will form a square joint when connected.
Use finishing nails to attach the new trim to the exterior wall of your home. Sink the nails below the surface of the trim with a hammer and nail set. Cover the nail heads with wood putty and scrape off the excess with a putty knife. Allow the putty to dry according to the instructions on the product label. Sand down the putty with fine-grain sandpaper until it is flush against the trim.
Apply paint, wood stain or a waterproof sealant if you are using unfinished wood trim. Allow the finish to dry and seal the edge of the trim with caulk. Dip your finger in water and run it along the bead of caulk to smooth it out.