an eye on what's ahead and try to predict what gear you will need to be in.
aim to maintain a constant pressure on your pedals. if your legs are spinning quickly and your bum feels like it's bouncing on the saddle - shift up gears. if you are really struggling to pedal - shift down gears.
hills can be hard, but there are things you can learn to take the work out of the climb.
learn the parts of your bike and how they work. 