The following tips apply to any bike:
Anticipate the terrain: Shift right before you start climbing, not halfway up when you’re slowing rapidly and applying maximum pressure on the pedals. If you do shift on a hill, shift one gear at a time, and momentarily relax pressure on the pedals as you’re shifting. If you hear a lot of grinding, that can be a sign that you’re shifting while applying too much pressure on the pedals—and excessive grinding will wear out your drivetrain more quickly. On flats or downhill sections, it’s OK to shift through more than one gear at a time.
When in doubt, use an easier gear: Being in a hard-to-pedal gear might seem faster, but it saps your strength quickly and can take a toll on your knees. Using an easier gear and pedaling at a higher cadence is more efficient than pedaling slower in a harder gear.
Try to maintain the highest pedaling speed that’s comfortable for you to sustain for the duration of your ride. You’ll probably get a sense of a good cadence for you after a few rides. You can also be scientific about things by getting a bike computer that lets you precisely monitor cadence as you ride.
The following tips apply to a conventional bike with more than one front chainring:
Use one shifter at a time: To simplify gear shifting and minimize stress on your drivetrain, don’t shift both the front and rear shifters at the same time. Remember: shift the chain between the front chainrings for big changes, then use the rear cogs to fine-tune your gear setting.
Avoid cross-chaining: Picking gears that put your chain on opposite extremes of the front cogs and rear cassette at the same time (cross-chaining) is hard on the drivetrain. Instead stick with rear cogs that are relatively close in alignment with the front cog you choose.