The venue pays a license fee to play music. Not entirely sure how they work out how to distribute the pay though. Lot easier with streaming but with physical media and music on USBs I'm guessing they just use the sales data on music and split up the licensing assuming what's being sold roughly matches what's being played.
> Not entirely sure how they work out how to distribute the pay though.
They don't.
Your money goes into a pot of money that also includes every radio, every TV channel, every song used in an ad etc. Every month (or year), your local music association (there's one in every country) sums up the play counts and redistributes the pot accordingly.
This is all to say that the only people that actually get paid from this pot of money are either gonna be domestic musicians or global top 40. Even if your tracks are super famous in clubs and every DJ that plays it accurately reports that, it's still very unlikely you're gonna make the payment cut. Even a relatively minor hit on the radio is valued more than a super-popular song in clubs because it is guaranteed to have a higher play count.