Many commonplace things that occur during riding can cause your derailleur to become misaligned. Bumps and jarring to the bicycle will cause your limit screws to slowly unscrew themselves. Impact to the derailleur itself can destroy your alignment. Realigning your derailleur yourself can save you a trip to the local bicycle shop and will definitely save you some money. Adjusting any derailleur uses the same process.
Set your bicycle into a work stand or position it so it is upside down on the handlebars and the seat.
Loosen your cable stops by turning them counterclockwise with an Allen wrench. The cable stop is the bolt on your derailleur that the shifter cable runs through. Do not remove these bolts completely.
Pedal your bicycle by hand so that the chain shifts to the smallest gear settings. Stand behind your bicycle as you pedal and check for the alignment of your derailleur over the smallest gear cog.
Tighten the high limit screw on your rear derailleur with a screwdriver if the derailleur is pushing your chain towards the right. Loosen the high limit screw if the derailleur is pushing the chain towards the left. The high limit screw is marked on your derailleur with an 'H'.
Adjust the front derailleur low limit screw with a screwdriver. Tighten your low limit screw if the chain is being pushed to the right. Loosen the low limit screw if the chain is being pushed to the left. The low limit screw is marked with an 'L'.
Push your front derailleur to the largest gear setting with your hands. Check the alignment of your derailleur over the largest gear cog. Tighten the high limit screw on the front derailleur until it just comes into contact with your chain. Loosen the high limit screw until the chain is centred in the derailleur.
Tighten your cable stops with an Allen wrench. Shift your bicycle up one gear. Tighten your tension adjuster located on the back of your derailleur with the shifter cable running through it if your bicycle does not properly shift. Turn this adjuster by hand clockwise to tighten it.