Derailleur Gears may look to be complicated devices but are actually quite simple in practice. The chain is pushed sideways onto the selected sprocket or chainring by using a friction or indexed lever. Modern bikes use an indexed system where a click on the shifter selects the desired sprocket. The gear shifter may be integrated into the brake levers.
If your gear indexing has suddenly started misbehaving, firstly check that the inner cable isn't corroded or frozen into the outer cable. A break in the outer casing can easily allow moisture to penetrate. Any undue friction between the inner and outer casing WILL affect your gear change. If this is your problem, a new outer cable housing and inner cable will need to be fitted.
The second thing to ask yourself is whether your bike has recently suffered a fall or accident which may have bent the derailleur or the rear hanger. Another reason for a bent rear derailleur would be maladjustment that has let it become embedded in the rear wheel.
Assuming you've made the above checks and the derailleur was correctly installed in the first place the most likely cause will be that the inner cable has stretched slightly or that you have installed a new inner cable.
At this point don't start adjusting the 'H' and 'L' limit screw adjusters, simply use the adjusting barrel which is located on one or both ends of the outer cable housing.
Rear Derailleur Adjustment
Start with the chain on the smallest rear sprocket ensuring the gear shifter is set accordingly (is allowing the cable to have the least tension). Use the shifter to move up to the next sprocket whilst slowly turning the pedals forward. If it doesn't make it then your cable doesn't have enough tension. If it overshoots, your cable has too much tension. Using the adjuster barrel enables you to get this first shift from the smallest to next smallest sprocket right. Don't move on until you've got this first shift right.
Once you've got the first shift right, move on to the larger sprockets. If the change to the larger sprockets is slow, you may need a little bit more tension - turn the barrel anticlockwise a smidge to increase the tension. If moving from the large to smaller sprockets is slow, you may have too much tension so turn the adjuster barrel clockwise to reduce the tension.
If you are struggling with this, seek professional help.