K-means clustering is an algorithm to perform clustering. It is simple to understand and implement, and hence is often the first algorithm to be tried out when performing clustering.
The idea behind clustering is to segregate the data into groups called clusters, so that instances with similar behavior are classified in the same cluster. It is used in data mining, pattern recognition and anomaly detection.
K-means clustering is also one of the most popular methods in unsupervised learning. Unsupervised learning is a set of techniques to identify patterns and underlying characteristics in data.