you can split bitcoin network into two parts: miners and nodes.
a miner is just a hardware (ASIC) that has computing power. the only thing they do is "calculate" (perform hashes) nothing else. but they connect to a node to receive the data they should hash. the node decides which transaction it should give the miner.
now a mining pool is a server that is running a node and the miners connect to in order to share the work. that pool/node decides which transaction to mine. for example they decide to only include transactions that are paying 2 satoshi/byte at least, another one could decide to include 0 satoshi/byte,... they could also decide which non-standard transaction to include in the blocks.
in all cases when a miner shares the work and they find a block they receive their share of the reward no matter what they mined (as long as the block was valid of course).
Thank you for explaining that. I am not a very technical person when mining concerned so I was very confused. I would have given you some merit but since you are already high rank I think you can do without it.