I'm a bit confused with geodesics : are they the shortest path (in distance) or the quickest path (in time). For example, Let take a triangle ABC. I'm using a car. I'm in $A$ and I have to go in $B$. The path $AB$ is 2km long, but I can go at 10 km/h only, where as the path that path through C has 4 km length, but it's a free way and I can go at 100 km/h.
Clearly, the path through C is quicker, but the path AB is shorter. What is going to be the Geodesic ? The path through $C$ or the path $AB$ ?
First note that a Geodesic does not have to be the quickest path between two points: For example, there are two geodesics on the sphere from say the north pole to say London. The shortest path is going down the Greenwich meridian from the north pole to London. But going from the north pole to the south pole along that same meridian and then going from the south pole to London along the shortest path (again along the Greenwich meridian) is also a geodesic from the North pole to London.
However, the shortest path between two points (if such a shortest path exists!) always is a geodesic.
Now to your actual question: what is meant by distance? In my example above "distance" meant the usual distance on a sphere. However you can choose what you mean by "distance" by specifying a metric. Roughly speaking a metric lets you measure lengths (and angles, too) in space. Your metric can just measure distance between points but you could modify your metric to take into account that something is slowing down movement.