Have you ever ridden a multi-speed bike? Do you understand gear ratios? Different size chain wheels have different numbers of teeth, when engaged via the drive chain with the rear cassette (sprockets) you can alter the gear ratio to suit your riding conditions. Smaller front chain wheel and larger rear sprocket will reduce the ratio and make climbing hills easier, while the larger front chain wheel and the smallest rear sprocket will raise the gear ratio and allow you to go much faster on a flat or downhill surface. Multiple combinations allow for many different "speeds" or ratios. That is about as simple as I can put it without drawings.