I'm going to take a stab at explaining gearing. You likely have three "chain rings" on your mountain bike--a big ring, a middle ring, and a small ring (or granny ring as it's sometimes called). By shifting your front derailleur, you will move your chain from one chain ring to the next. By moving your chain to the big ring, you will be able to access your biggest gears. They will take the most force to pedal. By shifting to the small ring, you will be able to access your smallest gears, which are easier to pedal.
But that's just half the equation.....
You also have a cassette in the rear of your bike. Depending on how your bike is set up, you probably have somewhere between 7-10 different rings or cogs in that cassette. By shifting your rear derailluer, you can essentially "fine tune" your gears. If you shift "up" to a smaller cog, you will be using a bigger, harder to pedal, gear. By shifting "down" to a larger cog, you will be using a smaller, easier to pedal gear.
Obviously, with three rings up front and 7-10 cogs in the rear, you have a variety of combinations that make up your available gears. Depending on the terrrain, the wind, how fast you want to go, how fast you want to pedal (your cadence or rpm), etc., you learn to pick the appropriate gear. The harder the hill, the smaller the gear. For descents, you'll likely want to be in a bigger gear. And on the flats, you'll likely want to pick a gear that allows you to comfortably spin your pedals between 80 and 100 rotations per minute.
When I first started to ride my road bike, I spent most of my time in my middle ring. There were two or three cogs in the back that I liked to use for most flat terrain and if I shifted to the biggest of cogs, I could handle most moderate inclines. It wasn't until I did the Hilly Hundred in Southern Indiana, that I had to become proficient at shifting to my smaller chainring in the front and finding a cog in the back that would allow me to climb really steep hills. I found out the hard way that it pays to shift to the smaller chain ring before actually climbing the hill. It's easier to shift, especially in the front, if the chain isn't under load.
As I've ridden more and gotten faster and stronger, I make more use of my big ring. Even so, there are several big gears that I just don't use much because I just don't have the strength to turn them (yet ).
There is some overlap in your gears. For instance, you can be in your big chain ring in the front and a big cog in the back and essentially be in the same gear as you would be if your chain was on your middle ring in the front and a smaller cog in the rear. I would add that both chain rings and cogs are described by their number of teeth. For instance, on my road bike my big ring has 50 teeth, the middle ring has 42 and the little one has 30. In the rear, I have 10 cogs that go from 12 to 25 teeth.
I hope that helps.
K-
Live with intention. Walk to the edge. Listen hard. Practice wellness. Play with abandon. Laugh. Choose with no regret. Continue to learn. Appreciate your friends. Do what you love. Live as if this is all there is.
--Mary Anne Radmacher