The formation of several clusters, arising from attracting forces between non-identical entities or agents, is a phenomenon observed in diverse fields. Think of people gathered through a mutual interest, swarm behavior of animals or clustering of oscillators in brain cells.We introduce a dynamical model of mutually attracting agents for which we prove that the long term behavior consists of agents organized into several groups or clusters. We have completely characterized the cluster structure (i.e. the number of clusters and their composition) by means of a set of inequalities in the parameters of the model and have identified the intensity of the attraction as a key parameter governing the transition between different cluster structures.The versatility of the model will be illustrated by discussing its relation to the Kuramoto model and by describing how it applies to a system of interconnected water basins.Pacs numbers: 89.75.Fb, 05.65.+b, 05.45.Xt