When a group decided to buy something that is quite expensive for just one or two persons, they all share money to get a bigger amount enough for buying that something.
What do you call what they do?
Informally, all these three are possible:
'They clubbed together to buy him the present.'
'They all chipped in to buy the present.'
'They had a whip-round to buy the present.'
More formally, you could say,
'Everybody contributed something towards the present.'
(a present [Uk] = a gift [US] )