Before we seal anything, I go through your attic looking for anything that stops the job, because sealing over a problem just locks it in, and you'll find the short list of those in the questions below. Then our crew pulls back the old insulation where it's in the way and seals the gaps one by one, with caulk for small cracks and spray foam for the bigger holes around pipes, wiring, can lights, the tops of interior walls and the attic hatch. Around furnace and water heater flues we use metal and heat-rated caulk, since foam has no business against a hot pipe, and the metal keeps insulation back from it too. We leave the soffit, ridge and gable vents and any combustion air ducts open, because those openings are supposed to move air, and then the insulation goes back down, spread even all the way to the edges instead of piled up in the middle.
Sealing is usually the first half of a bigger job. If your house is older and the insulation up there is thin, we seal and then top it up as part of retrofit insulation, and in most attics that's where I'd tell you to spend the money. If your ductwork runs through the attic, spray foam insulation under the roof seals and insulates in one pass and pulls the ducts inside the sealed space, so even though foam costs more, that's the case where I think it earns its keep.
Sealing only, under the insulation you have
This suits an attic where the insulation is dry, clean and already decent. We pull it back, seal what's underneath and lay it back down evenly, so you're paying to stop the leaks and not for material you don't need.
Sealing with a loose-fill top-up
This suits a house where the insulation is thin, matted down or uneven. We seal first and then add blown-in insulation, which is loose fill blown through a hose, and if the old stuff is soaked or full of droppings, it comes out before anything new goes in.