Distance is a numerical description of how far apart objects are. In physics or everyday usage, distance may refer to a physical length, or an estimation based on other criteria (e.g. "two counties over"). In mathematics, a distance function or metric is a generalization of the concept of physical distance. A metric is a function that behaves according to a specific set of rules, and is a concrete way of describing what it means for elements of some space to be "close to" or "far away from" each other. In most cases, "distance from A to B" is interchangeable with "distance between B and A".
Overview and definitions
A physical distance can be mean several different things:
The length of a specific path traveled between two points, such as the distanced walked while navigating a maze
The length of the shortest possible path through space between two point that could be taken if there were no obstacles (usually formalized as Euclidean distance)
The length of the shortest path between two points while remaining on some surface, such as the great-circle distance along the curve of the Earth