Whenever a rotating body ( gyroscope, Earth, galaxy) is acted upon by an external force, it produces a 'torque' that causes the rotation axis of the body to rotate around a circle. The Earth is affected by both the Sun and the Moon, and these cause the axis of the Earth to revolve around a great circle every 25,000 years or so. Currently the axis of the Earth is pointed roughly towards Polaris in the northern hemisphere, but over time it will drift towards Vega and Thuban and back to Polaris.