When installing an in-swing exterior door, it is important to make sure the door is installed at the level of the interior floor. That way when the door opens there will be room for a welcome mat, and it will scrape against the floor. If the location the door is being installed is lower than the floor, you may need to add a piece of plywood to raise it up. If you are installing the door on top of wood, the wood needs to be covered with a flashing to prevent it from getting wet. This video below shows how to add this flashing.
After you have put the door in place you'll need to use shims to ensure it is level, and the door opens and closes correctly. Here is a video that demonstrates how to shim the door:
once you have shimmed the door so it opens and closes smoothly, you can screw it in and use insulation to fill in the gaps. Here is a view that talks about that:
In the video, it shows the installer using Great Stuff Expanding Foam.