Gears are changed on the cassette (a set of sprockets on the rear wheel) by the rear derailleur. This shifts the chain up or down the cassette. As the derailleur moves to change gear it forces the chain against ramps or steps, moving it onto a bigger or smaller sprocket.