Often, the discussion of Mechanics starts with terms like distance, displacement, velocity etc. It is so because the easiest and most intuitive concept in Physics is that of Motion, for most people.
An object is said to be in motion if it is moving relative to something else, which is assumed to be stationary. For example, a car driven on the road is moving because it “shifts its position” with respect to any fixed point on the ground.
When something moves, it covers some distance. e.g. if you go from your house to your school, you covered some finite distance.
When you return from the school back to your home, again you cover some distance. The distance in both cases is equal(assuming you didn’t wander off somewhere in between!) and is equal to the length of the path.
Path Length = Distance
Also, it doesn’t matter whether you go from the school to your home or from home to your school, the distance is the same in both cases. Hence, distance is independent of direction.
Now, between any two points, there can be more than one paths each one of different length. Hence when you define distance, you need to indicate the path that you took.
e.g. in the following figure, I can identify two paths ABC and ADC between points A and C.
Hence, distance between two points can vary depending on the path taken.
In physics, fortunately, we deal with displacement rather than distance. In simple words, displacement between an initial point and a final point is specified as the shortest distance between the two points (along a straight line), directed from the initial point to the final point.
Hence, when you specify the displacement, you don’t need to specify the path or the direction. Because the path would just be the straight line between the two points and the direction would be from the initial point(A) to the final point(C).
To summarise, distance between two points is the length of the path taken. Given two points A and B, you cannot determine the distance even if you know their location(coordinates), because you are not given the details of the path taken. But you can always determine the displacement, it would be the shortest path between the two points, directed from the initial point to the final point.
Next: Velocity and speed