Moisture prevention measures
The sill is usually made from a dense weather-resistant timber, with a sloping rebate to shed water. A drip groove on the underside stops water from running back in under the sill.

Cross-section of a sill

This diagram shows how flashing is placed around the frame

This diagram shows a door frame set into a wall