See this page to learn about staking.
Claiming Rewards with Polkadot-JS
Anyone can trigger a payout for any validator, as long as they are willing to pay the transaction fee. Someone must submit a transaction with a validator ID and an era index. Polkadot will automatically calculate that validator's reward, find the top nominators for that era, and distribute the rewards pro rata.
The Staking system only applies the highest nominations to each validator to reduce the complexity of the staking set.
These details are handled for you automatically if you use the Polkadot-JS UI, which also allows you to submit batches of eras at once.
To claim rewards on Polkadot-JS UI, you will need to be in the "Payouts" tab underneath "Staking", which will list all the pending payouts for your stashes.
To then claim your reward, select the "Payout all" button. This will prompt you to select your stash accounts for payout.
Once you are done with payout, another screen will appear asking for you to sign and submit the transaction.