Hierarchical clustering works by either aggregating individual data points into clusters (agglomerative approach) or splitting a large cluster into smaller clusters (divisive approach). The process involves: 1. Distance Calculation: Calculate the distance between each pair of data points. 2. Linkage Criteria: Decide how to link clusters, such as single linkage, complete linkage, or average linkage. 3. Dendrogram: Create a dendrogram to visualize the hierarchy of clusters.