K-means is a popular clustering algorithm used in machine learning and artificial intelligence to partition a dataset into k distinct groups based on feature similarities. The algorithm works by assigning data points to the nearest cluster center and iteratively updating the centers until convergence is achieved, making it effective for discovering patterns within data.