How to use bicycle gear ratios
It depends on your cadence (number of times you're turning the chainrings). If you fix the cadence, largest chainring (gear in the front) and smallest cog (gear in the back) will be fastest. 

In practice, you will not be able to keep up the same cadence on all gear combinations, so depending on the cadence you can keep, a smaller chainring in the front and a larger cog in the back may end up being faster (since you can use a higher cadence) than a larger chainring and smaller cog (which, if you could spin at the same cadence would be faster, but you can't). 

You can use this calculator to see what speed you get for a given cadence for the chainrings and rear cogs on your bike.