The topology of the metric space is completely determined by the distance function. The open balls, all centers, all radii, form the base of the topology.
The open sets in a metric space coincide with the open sets you learned about in high school. They approach, but do not contain their boundaries. Closed sets contain their boundaries.
Let's start things off by defining the distance metric.