There are 21 elected witnesses based on the votes of vested token holders. The Steem community votes for witnesses based on the value they bring to the network. All other witnesses who do not make it to the top 21 act as backup servers and may end up validating blocks when an elected witness server is down or missing blocks.
When a witness validates a block of transactions, he receives a reward. 10% of all the new tokens being created by the Steem blockchain.