The simplest example of using the SHA256 hash algorithm is for example if your friend on the Internet sends you a text message and you want to make sure that this message is from your friend, not from anyone else. Your friend hashes his message before sending it. The received hash sends you for example by phone. You also hash received the message from your friend over the Internet and check the received hash with the phone. If they are the same, it means that the message was sent to you by a friend.
The hashing algorithm was invented a long time ago, but the most successful application is its use in the algorithm of blockchain. The hashing algorithm is used in the Bitcoin blockchain system and other crypto currency so that no one can somehow change the information in the blockchain because it is publicly available to all Internet users.
How it works can be clearly seen on the site https://anders.com
Having entered the site on the Hash tab, you can hash any information that you type. On the Blockchain tab, you will see the demon version of the blockichain of the crypto currency Bitcoin, which consists of a chain of blocks. The main indicator of the correctness and integrity of the chain is that each hash of each block starts with a certain number of zeros.
If you try to change or add information to any block, then in this block and in subsequent blocks the hash will instantly change and will not start with zeroes. And such a modified block will be rejected by the network until then the hash of this block will not start with zeros. To do this, you need to re-hash this block each time changing the value of the Nonce field until the hash starts with zeros. In other words, this and subsequent blocks must be re-mined, which is what thousands of miners around the world are engaged in. Everyone understands that this is impossible unless you have a computer quantized))
I hope my post helped you a bit to understand how the crypto currency