The client produces a proof of work , which is a short certificate of validating that it spent a quanta of its own time on a hard computational problem. Without a proof of work, the client cannot receive service. The assumption is that since a client is limited in computation power, it cannot create enough proofs of work to flood the server. Spam is a problem because a spammer can send many e-mails at once with little or no cost to himself. Hashcash is created by spending computer time on a hard computational problem.
Some explanation is in order here.
A hash function is any function that takes an arbitrary length string and returns strings of a fixed length. Ideally, the hash function should look like a random function , which is a function whose outputs are all chosen at random. Now a server can specify a particular hash function, such as the U.S. Government's SHA-1, a particular value for n, and a certain number of partial hash collisions it wants to see. This is the cost of using a resource. Sadly, the answer is likely no.