The earths axis of rotation is tilted 23.50 relative to the plane
containing the sun
and other planets.
The gravity from the Sun and moon is trying to tip the earth just like gravity is trying to tip a spinning top.
As with the top, the axis of the earth wobbles or PRECESSES in space, with a 26,000 year period.
Because the directions to the celestial poles are defined by the spin axis those poles move with time.
It isnt that the stars move it is that the grid we paint on the celestial sphere has to be redrawn from time-to-time.
Eventually Polaris will not be the pole star.