Staking is based on certificates that are stored in the blockchain. Pool operators (SPOs) must register their pool through certificates. Stakers must create certificates in order to delegate staking rights to chosen pools. Behind all of this are cryptographic keys. Come and dive into the world of Cardano certificates.
Read the article: https://cexplorer.io/article/understanding-cardano-certificates