A public key is used to receive bitcoin. When bitcoin is sent to a public key, only the owner of the private key will be able to sign a valid transaction to spend that bitcoin. A public key can be analogized to a PO Box, where anyone can send mail, while only the owner of the (private) key can then access mail sent to that PO Box.
Publicizing a public key is perfectly safe, while a private key must be kept secret. While a private key can be used to generate a public key, a public key cannot be used to reveal the corresponding private key.