It's not that hard.
Think of your bike as having 3 gear ranges that correspond to the front sprockets. The smallest front sprocket is for uphills. The middle sprocket is for flat roads. The biggest front sprocket is for downhills.
Within those three gear ranges, use the rear sprockets to fine tune your peddling effort and leg speed.