I'm trying to understand metric spaces, and from what I understand, they consist of a set $X$ and a distance function $d$. This distance function must output a real number that follows 3 properties (or 4 depending on how specific your definition is), which I will not bother going over in this question, since they all make sense to me.
Up until this point, everything seems pretty intuitive.
What I'm trying to clarify is this: is $d$ meant to return the "actual distance" between two points, or is it just a function that maps the points of the cartesian product of $X$ to satisfy the properties of a metric space? I ask this because when looking at the discrete metric space, the discrete metric does not actually take into account what the set $X$'s points are (aside from whether or not they are the same). It just outputs numbers that fit the definition of a metric space.
However, the set of real numbers $R$ is a metric space when the distance function $d = |x - y|$ is used, which makes perfect sense to me since $d$ in this case would output the actual distance between the points in $R$.
There is no such thing as "actual distance", you assume then a prefered metric already by making that statement. A metric is function that assign real values to any pair of elements and behaves in a manner that remindsof our concept of distance. However without a metric the concept of distance is meaningless.
It is therefore a mathematical generalization of our intuitive idea of distance, and those 3 properties is what is needed to capture that intuition.