One of the 50 questions in this topic
The derailleurs (front and rear) move the chain between the chainrings and sprockets to change gears.