TomTom interview question

How does K-means algorithm work