In public-key cryptography, each party has two keys: a public key and a secret key. Lets denote public key by P and secret key by S.
You have your own public and secret keys. Other parties who participate have their own public and secret keys. Secret keys are secret, but public keys may be known to everyone.
Also there exist functions that use the public and secret keys to either encrypt plaintext to ciphertext or decrypt ciphertext to plaintext. Let’s denote the function that I use with my public key by $F_{P}$ and the function that I use with my secret key by $F_{S}$. The public and secret keys have a special relationship: $F_{S}(F_{P}(x)) = x$, so that if you use my public key to encrypt plaintext into ciphertext and then I use my secret key to decrypt the ciphertext to plaintext.
<aside> 💡 Some other applications of public-key cryptography require that $F_{P}(F_{S}(x)) = x$, so that if I encrypt plaintext with my secret key, anyone can decrypt the ciphertext.
</aside>
Algorithms Unlocked - Thomas H. Cormen (2013)