How To: Install Flashing on a Roof
GAF- Mastering The Roof (chapter 13)

Flashing is used to seal and protects joints in a building from water penetration by direct the flow of water away from these otherwise vulnerable areas. For Flashing to function properly it is important that it is installed correctly