My groups have done it a couple different ways but it is generally along "common good" lines.
The most common is first figuring out if anything is either useless to the party or should obviously go to a specific character. If the latter, does it generate a "hand me down". (I.e. a +3 longsword for the fighter might free up a flaming longsword and now the ranger decides if the higher damage outweighs the lower to-hit of their +1 sword)
When there is some contention, like an item that is a marginal upgrade that is surprisingly valuable (like if a +3 cloak costs 2x of a +2 cloak), it gets to overall impact. Assuming a pair of +2 cloaks are for sale, would giving two characters a decent boost be better than one getting a larger boost? A lot of it comes down to which characters have the least stuff and/or how much the new items would impact effectiveness.
Unused & sold items go into the pot. Cash is also spent communally. There is sometimes a bit of debate about how much to spend on spell components, though usually non-casters are just fine with the caster having materials for 3-4 uses.
As for items, generally there is a standing list of "buy it on sight" items (potions of heroism, scrolls of see invisible, etc) that aren't too pricey. When commissioning items is an option (usually not d&d games) , the gold goes towards upgrading the characters at the low end of the power curve. Sometimes that may mean a character is loaded up with consumables to make up for some items we haven't been able to get. Usually the problem is more in treasure dice than party willingness to spend cash.
Generally items are considered to belong to the character however every so often there is an absurdly powerful/expensive item that should maybe, rationally, be sold but is just too awesome/useful/irreplaceable to NOT keep in the party. Those items are declared explicitly communal, at least until the rest of the party has equivalent loot. Cunning players will be sure to share the kewl toy around, if possible, so that it doesn't excessively hurt their loot awards.
Really, its a lot of socialists.