As a simple yet effective clustering method, the Kmeans algorithm assigns each instance to the cluster whose center (also called centroid) is nearest.
the center is the average of all the instances in the cluster, i.e., with its coordinates the arithmetic means for each dimension separately over all the instances in the cluster.