Every trade of a pump.fun coin pays a creator fee. pump.fun's program collects it in a vault that belongs to the coin's fee sharing config.
The money stays there until someone sends a distribute transaction. That transaction is permissionless: any wallet can send it, and it can only pay the recipients written in the config, in the written proportions. pump.fun requires a minimum amount before it will run, which each coin page shows.