Yep, schwim gave a great/simple explanation of something that can seem complicated.
Erlstn – From your post it sounds like you may be considering a couple bikes with different 3-ring setups. If you buy one of them, and after you gain some experience & confidence on the bike, pay close attention to which ring you use the most. I switched to a 1X set-up (32 works for me & the trails I ride) this past year b/c I was on the middle ring about 80% of the time. By removing the shifter, front derailleur & 2 rings I reduced some weight, greatly simplified my shifting, eliminated some parts that I never have to worry about servicing or replacing & cleaned up the look of my bars & bike. It also forced me to get stronger b/c I could no longer take the easy route & drop down to the 22 ring. You’ll be amazed to find how quickly you progress when the crutch isn’t there. The only (minimal) downside so far has been when I’m on a road en route to a trail and run out of gears. If I was racing and really needed to be able to crank at times I’d probably run a second ring. Just something to think about…not saying this is THE way for everyone or in all circumstances.