How Hierarchical Clustering Works