K-Means is a centroid-based clustering algorithm that partitions data into a predefined number of clusters (k) by minimizing the variance within each cluster. It assumes spherical clusters and requires the number of clusters to be specified in advance.
DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm that groups together points that are closely packed together, marking points in low-density regions as outliers. It does not require the number of clusters to be specified beforehand and can find clusters of arbitrary shapes.