Set the shifter, located on the handlebars, stem, or downtube on the bike to the lowest gear setting. This will give the cable the necessary slack to make adjustments to its tension. Locate the derailleur cable stop bolt by following the cable from the shifter to where the cable connects with the shifter.
Loosen the cable stop bolt on the derailleur using a 9mm wrench. Spin the cranks of the bike forward to allow the derailleur to settle into place.
Observe the alignment of the derailleur pulleys, which the chain runs through just below the cassette, and the smallest cog on the cassette. The chain should form a straight, vertical line between the small cog and derailleur pulleys. If the pulleys sit to the right of the cog, tighten the high-limit screw using a phillips screwdriver until the chain forms a vertical line. If the pulleys sit to the left of the cog, loosen this screw until the chain forms this vertical line.
Pull the cable taught under the cable stop using a pair of needle nose pliers or a cable-pull tool, if you have it. Tighten the cable stop using a 9mm wrench to secure the cable in place. Pull on the shifter a few times to ensure that it will not slip underneath the bolt. Cut off any excess cable, leaving about an inch for adjustability later, but short enough that it does not get caught in the wheel while riding.
Take the bike for a test ride and shift through the gears. Because you aligned the derailleur and tightened the cable appropriately, shifting should be smooth, quick and accurate. If you still experience problems, have your bike looked over by a certified bicycle mechanic, as there may be more serious problems with the shifting.