Goldwasser, Micali and Rackoff formalized the idea in the 1980s. A prover convinces a verifier that some statement holds (I know the password, this transaction balances, I'm over 18) and the verifier learns nothing else. The classic teaching example is a cave with a locked door in a ring-shaped tunnel: you can show you know the door's secret by repeatedly coming out of whichever side the verifier names, without ever showing the secret.
In cryptocurrency they do real work. Zcash's shielded transactions use zk-SNARKs to prove a transaction is valid without revealing sender, recipient or amount. Monero uses Bulletproofs+, a zero-knowledge range proof, to show hidden amounts aren't negative (which would let someone create coins from nothing) without revealing them.
Outside crypto, they're behind some private credential schemes and age-verification proposals. The catch is that real implementations depend on careful engineering, and some schemes need a "trusted setup" whose secrets must be destroyed. Zcash's early setup ceremonies drew plenty of scrutiny for that reason.