We know which miner/pool mined a block only if that miner/pool chose to identify themselves. Most commonly, they do this by inserting their name or other recognizable signature in the block's coinbase transaction, which is allowed to contain arbitrary data. Sites like blockchain.info can then record statistics about how many blocks were mined by which pools.
You'll see entries even for very small pools if they identify themselves. For instance KanoPool is shown on that page as having 0.3% of all hash power in the past 48 hours. This is because they mined 1 block out of the roughly 288 total blocks during that time, which is 0.3%. KanoPool apparently identifies its blocks with the string KanoPool (=O.O=) in the coinbase (example).
Presumably someone at blockchain.info is maintaining a list of known pools and their identifiers. But it may not be complete; for instance, block 552572 has in its coinbase the string BTPOOL, which is presumably the name of some pool. Blockchain.info lists it as "unknown", probably because BTPOOL isn't in their list of known identifiers. Maybe they'll add it later.
Other blocks don't contain any recognizable identifier at all. For instance, the coinbase of block 552568 doesn't contain anything that looks to me like text, and Blockchain.info doesn't recognize it either. We won't ever know who mined this block unless they choose to identify themselves someday. (For instance, maybe the data in that coinbase is a nonce signed with some private key; then someone could prove that they mined the block by signing some other data with that same key.)
Possible duplicate of How to tell who mined a bitcoin?
– Nate Eldredge – 2018-05-14T00:29:26.103See also https://bitcoin.stackexchange.com/questions/70274/why-do-some-blocks-not-have-miners-name-identity/70279#70279. Short answer: we know who mined a block if that miner/pool chooses to identify themselves in some way, commonly by including their name in the coinbase transaction. If they don't do so, then we don't know.
– Nate Eldredge – 2018-05-14T00:30:15.177Nate, so do you know what % of mined blocks can be linked to a specific miner/pool? – Damian Siniakowicz – 2018-05-14T00:38:47.627