In simple terms, its main purpose is to secure the network whilst it locates an agreement on the order of the transaction, which will then be added to the blockchain, that can not be tampered with or altered.
Proof of work (PoW) describes a system that requires a not-insignificant nonsignificant but feasible amount of effort to deter frivolous or malicious computer power users, such as sending spam emails or launching denial of service attacks. The concept was subsequently adapted to securing digital money by Hall Finney in 2004 through the idea of "reusable proof of work" using the SHA-256 hashing algorithm.
Following its launch in 2009, Bitcoin became the first widely used application of Finney's PoW concept Did you know that Hall Finney was the recipient of the first Bitcoin transaction recorded?
However, proof of work forms the basis of many other cryptocurrencies, allowing for secure, decentralized transactions.
Understanding proof of work
This explanation will concentrate on proof of work as it is used in the bitcoin network.
This ledger contains a record of all bitcoin transactions, which are organized in sequential "blocks" so that no user's holdings can be spent twice.
Furthermore, to prevent tampering, the ledger is public or "distributed"; other users would quickly reject an altered version.
Users detect tampering in practice through hashes, long strings of numbers that serve as proof of work. Put a given data set through a hash function (bitcoin uses SHA-256), and it will only ever generate one hash. Due to the "avalanche effect," however, even a tiny change to any portion of the original data will result in an unrecognizable hash. Furthermore, whatever the size of the original data set, the hash generated by a given function will be the same length. Thus, the hash is a one-way function: it cannot obtain the original data, only to check that the data generated matches the original hash.
Generating just any hash for a set of bitcoin transactions would be trivial for a modern computer, so to turn the process into "work," the bitcoin network sets a certain level of "difficulty."
This setting is set so that a new block is "mined" – that is, added to the blockchain by generating a valid hash – every 10 minutes.
Setting the difficulty is done by defining a "target" for the hash: the lower the target, the smaller the set of valid hashes, and the more difficult it is to generate one. In practice, this translates to a hash that begins with a long string of zeros.