Vents, and anything else that sticks out of a roof, is sealed with what roofers call flashing. Flashing can be plastic or metal. The reason you have to use flashing is that the hole in the decking of the roof is usually just a square hole. Since you have a round pipe there has to be some way to seal it. Thus flashing is used. For plumbing vents this can be lead, or it can be a flexible grommet. Lead is resistant to sun, so its used in the South more than grommets. But grommets are less expensive, so in lower sun lower rain areas grommets work fine.
Lead should last the life of the house, but since squirrels like to chew it, lead sometimes has to be changed out. This is expensive as the shingles usually need to be pulled and a new flashing put down. Sometime a flashing is simply cut and put on top of the damaged flashing, but then you are paying for an entire flashing. A Critter Quitter repairs the flashing without the need to remove shingles and will look great.