Figure 1 - Sagging shingled roof
You should also be looking at the structure of the roof. While this is not a problem which is isolated to shingle roofs, it is a problem that if it occurs must be dealt with.
The roof shown in Figure 1, is sagging from the center of the structure to the towards the sides. This is most likely caused by incorrectly sized trusses or damage to the roof truss system.
If you have to make a roof repair choose a warm day so that the shingles will be flexible and unlikely to crack when lifted. The roofing cements also spread easier in warmer temperatures.
You will know when you have a roofing problem when you see beige spots appearing on ceilings and walls close to the ceiling. Beige spots are a sign of water damage.
Roofing cement is the equivalent of duct tape for roofs. It will repair most leaks, cracked or torn shingles, patch flashing around vent pipes and chimneys. You can also use the roofing cement to cover nail heads that have been exposed.
Shingles fade with age so any replacement shingles used will most likely be visually obvious. Shingle over damaged ridge shingles, by nailing down all the corners of the old shingle first - do not remove them.
If you have to replace an entire shingle lift each of the tabs and pry the nails out of the shingle of the one that needs to be replaced, as shown in Figures 2 & 3. Remove the top corners of the replacement shingle and very carefully, without damaging the roofing felt, slip it under the existing shingles.
Use roofing nails (large head, galvanized) to fix the new shingle to the roof decking. Use roofing cement to cover the nail heads.