On a cool day, or in the early morning before the sun is on the roof...
Use a putty knife or painter's bar to gently separate the layers of shingles. They should pop apart without tearing chunks out of either layer. If you can't get that to happen you may need to replace shingles. You only need to loosen the area around each hole a bit. Be careful to separate the full shingle and not the laminations of a single shingle**.
Squirt a quarter-sized gob of roofing sealant* onto the nail holes under the loosened shingle. Also put dabs where the original tar strips are located to promote re-adhesion of any detached areas. Don't use silicone or other caulks. They aren't well suited to this task.
Press it down firmly. Watch for squeeze-out along the bottom edge, and be sure to prevent that by removing caulk before it contacts the visible surface of the shingle below. It'll make a mess and look bad from the ground.
Carefully pick away any sealant that squeezes through the nail holes, leaving it flush with the top surface. Do not apply additional sealant above.
I don't recommend sealing holes from above. That doesn't address the hole in the shingle below, and usually looks bad.
If you have spare shingles and would like to replace any badly damaged ones, follow step 1 and then pull all involved nails. Simply nail the new shingle in place as the original was. If you like, use sealant under the new shingle to help it bond to the one below. Its seal strip will bond it to the one above.
While you're on your roof avoid walking heavily on the lower edge of each shingle row. Grinding away the ceramic granules accelerates deterioration. Wear soft-soled shoes. Disburse traffic patterns.
* A.K.A roofing cement, asphalt sealant, flashing sealant, and any number of other names. Pick something specifically for use on asphalt shingles ("fiberglass" shingles still have an asphalt impregnation, just as "organic mat" shingles did). Caulks like silicone dry and let go over time, whereas roofing products tend to remain gummy.
** Say that ten times fast.