The front 3 give you 3 different ranges:
small ring =low (easy to pedal uphill)
large ring=high (for downhill or tailwind).
In theory you can use any front chainring with any rear cog to give a choice of 21 gears.
In practice, the 3 ranges have a considerable overlap. You can work out the overlap by calculating the ratio in gear inches
A further practical limitation is that you should avoid the crossover gears which can lead to excessive wear and strain on your chain. Small/small and large/large combos can all be replicated using a straighter chainline.