Hashcash was proposed by Adam Back in 1997. A sender must find a hash with a certain number of leading zeros. That is costly to find but quick to check, so mass spam becomes expensive.
Bitcoin's proof of work uses the same "costly to make, cheap to verify" idea, with SHA-256 and a difficulty that adjusts.
Takeaway: Mining is Hashcash turned into a security system.