In most contexts within mathematics and computer science, “distance” refers to a metric - a function that measures separation between points while satisfying specific axioms (non-negativity, symmetry, triangle inequality).
But, sigh

The term “distance” in mathematics is actually somewhat informal and context-dependent.
When mathematicians say “distance,” they usually mean a metric - something that satisfies those four axioms we discussed. But in practice, we often use “distance” more loosely to mean “a measure of how different two things are.” - Claude

Some colloquial uses of "distance" that are not metrics

Divergences like KL-divergence (asymmetric, violates symmetry axiom)
Quasi-metrics in directed spaces (intentionally asymmetric, like time to travel uphill vs downhill)
Psychological or perceptual distances (may violate triangle inequality - e.g., color perception)
Statistical distances like Mahalanobis distance (metric only in the transformed space)

Common distances that are proper metrics

manhattan distance (): - “taxicab” distance on a grid
euclidean distance (): - the “straight line” distance
Chebyshev distance (): - maximum coordinate difference
hamming distancen: Number of positions where symbols differ (for strings/vectors of equal length)
graph geodesic: Shortest path length between nodes (satisfies all metric axioms on the graph)
cosine distance: where is angle between vectors (metric for normalized vectors)
Jaccard distance: for sets A, B
levenshtein distance : Minimum edits to transform one string into another
Wasserstein distance: Optimal transport cost between probability distributions
Hausdorff distance: Maximum distance from any point in one set to its nearest neighbor in another set

Link to original