Unsupervised learning is a class of machine learning algorithms that learn the underlying structure of a dataset without being provided a target variable. Unsupervised learning is used to discover common patterns in data, group the values based on their attributes, and then later make predictions on unseen data. The most common unsupervised learning algorithm is k-means.