Hi
A gyro has an axis which maintains its direction in space constant. As if it was pointing at a star (we can consider the fixed in space) all the time, regardless of the motion of the gyro.
So if the earth rotates, the gyro apparently wanders because it will keep pointing the "moving" star.
Similarly, if you move from point A to B, the path is curved because the earth surface is curved, so the gyro will apparently move, always pointing its beloved star.