First off: Welcome back the cycling world!
Yup, gears can take some getting used to. This is a common experience for adults getting into cycling after having not ridden since childhood. It will become second nature before you know it.
A quick guide to the confusing world of gears
Your left hand shifter corresponds to the front gears, the ones attached to your pedals. Your right hand shifter corresponds to the rear gears, the ones attached to the rear wheel.
One of the things that can be confusing is that on the left/front gears, a higher number corresponds to a larger chainring. But on the right/rear gears, a higher number corresponds to a smaller chainring (usually called a cog in the rear, don't ask me why the names are different).
It's easier to think of it as lower numbers being closer to the frame and higher numbers being farther away from the frame. That's true on both the front and rear gears.
Now, to answer your question
You don't mention if it fell off of the front or rear gears. Either way, all you need to do is look at the corresponding shifter and see what number it's on. If the number is high, put it back on the outside gears. If it's low, put it on the inside gears.
One thing I find helpful is to pick up the rear wheel and give the pedals a turn or two by hand once you have the chain back on. This will get the chain back in line where it's supposed to be even if you put it on incorrectly.
One last note about why your chain fell off
There are two likely reasons that your chain fell off:
You were shifting under load. Most bikes aren't designed to shift while you're pedaling hard. You'll want to learn to anticipate your need to shift to lower gears and do it a smidge before you actually need it.
Your bike is improperly adjusted. This is incredibly common for bikes purchased from big box stores like WalMart, Target, or even the big all-purpose sporting goods stores. It also wouldn't be surprising to find on a bike that you purchased used.
Unless you got your bike from someone who is a decent bike mechanic themselves and you trust that person to have put the effort in to make sure it's properly adjusted, I'd recommend taking it in to a bike shop to have everything checked and adjusted. This is especially true if you got your bike from a big box store. Those bikes are poorly assembled, sometimes dangerously so.