In more detail
What one key does, only the other can undo. Anyone can encrypt a message with your public key but only your private key can read it, and a signature made with your private key can be checked by anyone with the public key (Digital signature). RSA and elliptic-curve schemes such as Ed25519 are common. It underpins TLS, SSH and signed software.