Thank you, @mocacinno, you really made things simplier. When we say entity, we mean like 20000 people using bitcoin hardware? And if the entity creates a block will I get the analogous amount for the number of hardwares I had to help the pool?
Yup... That's more or less correct. It's an oversimplification, but the basic idear is defenatly in the right direction
I have no clue how many miners are mining in those big pools, but it'll likely be thousands.
The pool actually runs the mining node (basically just a normal node). The pool creates the block, the pool creates the block header.
This block header gets passed to the miners connected to the pool (there are different ways of communicating, different protocols to do this).
Each miner now works with the header they received from their pool and starts iterating trough the nonces in the hope he'll find a nonce for which the sha256d hash of the header is under the current target. If he does, he sends this info back to the pool, and the pool does all the rest of the work.
In order to decide how much of the coinbase reward is given to each individual participant, the pool works with "shares". Basically, they set a virtual target that's much higher than the actual target. If a miner finds a nonce for which the sha256d hash of the header is under the "fake" target, he sends this info back to the pool. The pool now knows the miner has actually tried x hashes (on average).
Since the fake target is much higher than the real target (and since you have to find a header whose sha256d hash is UNDER the target, this fake higher target makes it easyer for the miner to be be under the fake target), any miner with decent hardware will find several shares per hour.
Once a block is found, the pool counts the total number of shares that's been sent by all it's participants between the last block they solved together and the new block, each participant gets a share of the coinbase reward that is equal to the number of shares he sent in vs the total number of shares.
In reality it's even more complex, a mining pool can set different "fake" targets for different miners, and adjust the sharecount based on mathematical equations between the "fake" targets. There are also pools that work with a sliding window of shares (PPLNs pools), there are pools that keep the fees for themselfs, there are pools that distribute the fees, there are pools with low poolfees, pools with high poolfees, profit switching pools, pools that pay their miners directly from the coinbase reward, pools that require x confirmations,...