Density-based spatial clustering of applications with noise (DBSCAN) is a data clustering algorithm. DBSCAN views clusters as areas of high density separated by areas of low density.
DBSCAN is a density-based clustering algorithm: given a set of points in some space, it groups together points that are closely packed together (points with many nearby neighbors), marking as outliers points that lie alone in low-density regions (whose nearest neighbors are too far away). DBSCAN is one of the most common clustering algorithms and also most cited in scientific literature.
-- Wikipedia
Due to this rather generic view, clusters found by DBSCAN can be any shape, as opposed to k-means which assumes that clusters are convex shaped. The central component to the DBSCAN is the concept of core samples, which are samples that are in areas of high density. A cluster is therefore a set of core samples, each close to each other (measured by some distance measure) and a set of non-core samples that are close to a core sample (but are not themselves core samples).
-- scikit-learn
Below is an example of DBSCAN finding clusters based on their density, as opposed to their distance from a centroid (i.e. as k-means would):