The definition I have been given for a metric space is such:
A metric, or a distance function on $X$ is a function $d : X \times X \to \mathbb{R}$ ........
So my question is: This is essentially saying a mapping from a Cartesian product to the real numbers. So wouldn't this just be some point in your set that maps to a real number, not two points that map to a real number? For example $A=\{1,2,3,4\}$ then $A \times A$ would simply be a pair $(a,b)$ ($a,b \in A$) and how would a pair mapping to a real number create a distance?
Perhaps an example of a metric would help. Suppose you had a distance function $d: \mathbb{R}\times\mathbb{R}\to\mathbb{R}$ defined by $$d(x,y)=|y-x|$$ where $||$ denotes the absolute value of the difference. Then from the set of all ordered pairs $\mathbb{R}\times\mathbb{R}$, you receive a real number as an output, and this number corresponds to a distance, which, in this case, is the difference between two real numbers.
Another sub example, what is the distance between 3 and 1, for instance? Take $d(3,1)=|3-1|=2,$ thus 3 is two away from 1.
Main Idea: The ordered pair $(a,b)$ could be thought of as a point of $\mathbb{R}\times\mathbb{R}$ or as an interval in $\mathbb{R}$.