How to Adjust Bike Gears
To adjust bike gears, start by turning your bike upside down and resting it on the seat and handlebars. Then, shift your bike to the gear that you're having problems with. If the problem with your bike is that the chain won't shift down when you lower your gears, turn the cable adjuster clockwise to loosen it. If you're having the opposite problem and your bike won't shift up when you go up a gear, tighten the cable adjuster by turning it counter clockwise.
Raise the bike off the ground on a bike stand. You need to be able to spin the wheels freely without the bike moving. The best way to do this is with a bike stand. If you don't have one, check if your local bike shop or outdoor store has a "maintenance night," where you pay a small fee to access to all of their tools for the night. You can also turn the bike upside down, resting it on the seat and handlebars. If you do, however, know that you will have to reverse the direction you spin things in the following instructions. You can also hang the nose of your saddle in the notch of a tree or low hanging joist. Locate your derailleurs. Derailleurs are the machines that physically shift your gears and keep your chain in place. There is one on the back wheel attached to the cassette (the collection of gears) and another smaller derailleur near the pedals. Check that there is nothing in the derailleurs or gears like leaves, sticks, or mud, and clean them with a damp cloth. The rear derailleur is the more complex machine, consisting of the derailleur, an arm, and 1-2 smaller gears that the chain is threaded through. A cable pulls this arm back and forth, allowing the chain to switch gears. The front derailleur is clamped onto your bike's frame, and consists of a spring and two "derailleur plates," or small metal walls that force the chain to stay on only one gear at a time. Diagnose your shifting problems by testing each gear. Using one hand to lightly pedal the bike, shift through 1 gear per click, starting with every gear on the back derailleur. Go up every gear once and down every gear once. Note places where the gears have trouble shifting, where the chain slips off the gear, or where you need to shift twice to make the bike shift. While testing one derailleur, put the other one in the middle gear. For example, if I am testing the back derailleur and I have 3 gears in the front, leave the front derailleur in the middle ring the entire time. This prevents the chain from stretching. Find the cable adjusters. Follow the cables leading to the derailleurs to find the adjusters, which look like little nuts or barrels surrounding the cables. There may be two for each cable -- one at the derailleur end and another by the handlebars. These make small adjustments to the derailleur cables, allowing you to make subtle changes to your shifting. Shift to your "problem gear. " While pedaling the bike with one hand, shift your gears up until you get to a problem, such as if the chain won't shift, has trouble staying on the gear, or skips a gear. Stop shifting when you find an issue, but keep your bike in that gear. Loosen your cable adjuster if the chain won't shift down. If you have trouble shifting as you lower your gears (lower gears are closer to the wheel), then loosen the cable adjuster by turning it counterclockwise. Turn the adjuster slowly, turning until the chain falls into the correct gear. Always work slowly, adjusting by a quarter-turn at a time at most. Think of it as of turning the adjuster the way you want the chain to move. Rotate towards the bike to make the chain move towards the bike. Don't loosen the adjuster too far or it may detach from the derailleur. If you need to make a large adjustment, thread the adjust into derailleur, shift into the smallest gear, loosen the pinch bolt, and pull the cable by hand. Tighten your cable adjuster if your chain won't shift "up. " If your bike struggles to work it's way up the gears (away from your bike), you should tighten the cable adjuster by turning it clockwise. When it is correct, the chain will naturally switch to the correct gear on its own. Think of this as turning the adjuster the way you want the chain to move. Rotate away from the bike to make the chain move away from the bike. Return to your low gear and shift back all the way up and down. Once you've successfully adjusted the problems, cycle through every gear again to make sure that the derailleur can successfully shift through every gear. You want the chain to flow smoothly from gear to gear every time you shift. Take short practice ride to spot any other problems. Sometimes the bike will behave differently under your weight. In a parking lot or driveway, ride the bike around and cycle through any gears. Note any problems and adjust your cables accordingly. Raise the bike off the ground on a bike stand. You need to be able to spin the wheels freely without the bike moving. The best way to do this is with a bike stand. If you don't have one, check if your local bike shop or outdoor store has a "maintenance night," where you pay a small fee to access to all of their tools for the night. You can also turn the bike upside down, resting it on the seat and handlebars. If you do, however, know that you will have to reverse all of the following instructions. Shift to your lowest gear. On the rear derailleur, this is the small gear furthest from the bike. On the front derailleur, it is the small gear closest to the bike. Shift the derailleur you are not working on to a gear somewhere in the middle. Unscrew the bolt holding the cable in place. This is found at the end of the cable leading from your handlebars to your derailleur. A small bolt clamps the cable in place, holding it tight. Using an Allen key, unscrew the bolt to free the end of the cable. Advanced Note: You'll notice that, if you pedal the bike, the chain will slide down to the lowest ring without your help. That is because derailleurs work by tightening the cable to hold the chain in place. Similarly, you can shift your bike manually by pulling the cable. Locate your derailleur's "limit screws. " In order to prevent your chain from slipping off, the derailleur is contained to the small area between the gears. There are two small screws which hold the derailleur in place, located right next to each other on the top (front derailleur) or back (rear derailleur) of the derailleur. The screw on the left, often labeled with an "H," which limits how high the chain can go and affects the outer gears. The screw on right, often labeled with an "L," limits how low the chain can go and affects the inner gears. Tighten the screws to keep the chain from falling off. If your chain is falling off near the outer gears of the front derailleur, then tighten the H screw to limit it. When the chain falls off closer to your wheel, then tighten the L screw. Consult with your bike's manual if the H and L screws aren't clearly labeled. Using your hand, push the rear derailleur to the inside of the bike as far as you can. If the derailleur pushes too far the chain will fall off the gears and towards the wheel. Alternatively, it may not push far enough, and the chain will not get to all the gears. You can then adjust the limit screws to move the derailleur -- and you will actually see it moving. Tighten the low limit screw if you the chain goes too far. This will keep the derailleur from moving too much to the left. Loosen the low limit screw if you cannot shift into every gear. This will allow the derailleur to move farther in. Adjust the front derailleur so that the derailleur plates sit on either side of the chain. With the chain on the smallest gear, tighten or loosen the low limit screw so that the chain doesn't touch the derailleur plate. Shoot for 2-3 millimeters of space on each side of the chain. Bolt the cable back to the derailleur. Shift back down to the smallest gears and pull the cable tight by hand -- it does not need to be perfect, just taut -- then screw the cable back in place underneath the bolt on the derailleur you removed it from. Often, you can see an indent in the cable indicating where it was bolted before. Use the cable adjusters to adjust your gears properly. Make sure your bike can shift comfortably to and from every gear in the front and back, and use your cable adjusters to make changes where necessary. Only shift 1 gear per click. 
Raise the bike off the ground on a bike stand. Locate your derailleurs. Diagnose your shifting problems by testing each gear. Find the cable adjusters. Shift to your "problem gear. Loosen your cable adjuster if the chain won't shift down. Tighten your cable adjuster if your chain won't shift "up. Return to your low gear and shift back all the way up and down. Take short practice ride to spot any other problems. Raise the bike off the ground on a bike stand. Shift to your lowest gear. Unscrew the bolt holding the cable in place. Locate your derailleur's "limit screws. Tighten the screws to keep the chain from falling off. Using your hand, push the rear derailleur to the inside of the bike as far as you can. Adjust the front derailleur so that the derailleur plates sit on either side of the chain. Bolt the cable back to the derailleur. Use the cable adjusters to adjust your gears properly. 