A Geodesic is simply the shortest path between two points on a surface, and more generally, on a Riemannian Manifold.
The term also has meaning in any differentiable manifold with a connection. It is a generalization of the notion of a “straight line”.
Relation to Relativity
Was talking with Soham today (Nov 11, 2022) and he was telling about how he encountered about Geodesics when it comes to Relativity, because space and time are connected by this constant, which is the speed of light.
Light always takes the shortest path, the geodesic, to travel in space and time.