The rear cable housing must be taken out and cleaned and lubricated regularly. Dirt and water get into it, affecting the derailleur and the index system.
If your chain is slipping when on one of the smaller sprockets it may be worn. In this case you will have to replace the rear cassette or freewheel.
A bent derailleur hanger will throw off the synchronization of the gears. Straighten the rear derailleur by removing it and using a large adjustable wrench. It might be easier to take it to the bike shop where they have special tools for that kind of job.
A stiff link will cause the chain to jump. If you have one, most chain link extractors have a setting from removing stiff links. If not, press hard with your thumbs on either side of the rivet.
Keep your chain clean. You can clean a chain with a toothbrush and solvent.
Check your front derailleur regularly. It should sit 1mm above the outer chain ring and the chain should be able to travel across all 3 chain rings easily.
Check that your chain isn't worn. Do this by pulling the chain on the outer chain ring. If it comes away easily, it needs it be replaced.
Crank set and Pedals
Most importantly, make sure that all the mounting bolts, chain ring bolts, and the crank bolt are tight.
The cranks and taper have specific edges and will come loose when worn beyond a certain point. Never over-tighten the crank. This will cause the taper on the crank arm to flare and the crank will be impossible to tighten.
A bent chain ring, if not bent too severely can be straightened back into shape. Carefully straighten it using an adjustable wrench slotted over the ring. Then spin the cranks backward to check its straightness.
Pedals with pedal bearing will last significantly longer than those without because of the small size of their surface. Grease the threads before you screw them into the cranks.
If you have a loose crank, hold the bike frame and gently pull a crank arm outwards. If there is movement to one side only, it means that only one side of the cranks is loose. If both sides move, the bottom bracket is probably loose. Get either of these problems repaired as soon as possible.
If your gears slip under pressure, the teeth on the chain rings may be worn. If you buy new chain rings, check the BCD size before you leave for the shop, or bring your old chain ring with you.