There are two notions of compactness, they turn out to be equivalent for metric spaces.
Let be a metric space, a subset.
The two notions turns out are equivalent, see https://courses.wikinana.org/math104-f21/compactness
We will follow Pugh to give a proof. See also Rudin Thm 2.41
We will finish discussion about compactness. In particular, in , we have Heine-Borel theorem, namely, compact subsets are exactly those subsets which are closed and bounded. Note that, this is false for general metric space, e.g. closed and bounded subset in are not compact.