The same pair of keys can do a second, different job, and mixing the two up causes most of the confusion in this field.
Encrypting
Signing
Question it answers
Can anyone else read this?
Did this really come from who it claims, unmodified?
Who uses which key
Sender uses your public key; you unlock with your private key
You use your private key to sign; everyone verifies with your public key
Result
Content is hidden
Content is not hidden at all, just provably authentic
A signature is a small tag that proves a specific person produced a specific piece of data and that nobody altered a byte of it afterwards. It hides nothing. This tool signs a great deal: who granted access to whom, who published which version of a secret, who was added to the team. That is how a computer you do not trust can be made to carry the truth without being able to change it.