For signature verification
Feed the public key a signature that its partner private key made, and it says yes. Feed it anything else (a forgery, a signature from a different key, a genuine signature over altered text), and it says no.
The public key can only recognize, not create. That’s why it’s safe to hand out: possessing it lets you check others’ signatures but gives you no ability to produce one.