Remember it takes one year for the earth to orbit the sun once. Visualize it as a combined system (earth/sun) orbiting about a common point of mass moving as a whole relative to the center of the galaxy. Don't forget the galaxy is also moving linearly as a "whole" as well.