Observe the terrain you’re riding, and select the appropriate gear in time. Thus, if you’re heading towards a hill, connect your chain to the smallest chainring and to one of the lower sprockets (1-4). If you don’t do this at the right time, you will have to change gears while you’re already pedaling up the hill, under heavy load, wearing and tearing your transmission system and even risking a broken chain. You may have experienced situations when you shifted gears while pedaling hard and you could hear terrifying noises coming from the transmission.
Also, it doesn’t hurt helping the chain to move on chainrings and sprockets. When you change gears, try to relax your pedaling and avoid applying a great force on the pedal.
Make sure your derailleurs are perfectly set so they work at their best capacity. Also, shift gears one by one because if you do it too fast your pedaling might just idle until the chain connects to the desired sprocket and this can cause a serious fall.
If the chain drops from the chainrings/sprockets you can still help it recover by shifting gears in reverse to its direction of falling: if the chain drops towards the exterior shift in a lower gear, it falls towards the interior, shift in a higher gear. Be careful with this maneuver, gently pull the shifter lever as the chain may get stuck between frame and chainrings/sprockets and spokes, and don’t pedal too hard.