When asphalt shingle roofing meets siding at a vertical wall, how should the flashing be installed?

When asphalt shingle roofing meets siding at a vertical wall, how should the flashing be installed?