A hash function is a mathematical function with a few special properties, but like any other function, it does one job. The hash function takes an input and produces an output (also called hash value, hash digest or a hash).
The input doesn’t have to be a number; it can be any sort of data from a single character up to a large file like a video. The output of a given hash function has a constant length no matter what the input was. There are many hash functions out there, and most of them carry the length of the output they produce in their name. One of the most commonly used hash functions is SHA256 (Secure Hash Algorithm 256-bit). The number indicates the output of the hash function will always be 256-bit long no matter the input. The hash value serves as a fingerprint of data. One can verify the integrity of the files or detect if they differ from one another by comparing the hashes.
Public-key cryptography is also known as asymmetric cryptography. The term asymmetric stems from the property of keys always coming in pairs. If you have encrypted something with one of the keys, you need the other one to decrypt it and vice versa. These keys are the public key and private key (or secret key). Your keys translate to your identity on the blockchain. You receive funds with your public key and send funds with your private key. Cryptocurrencies are so called because the consensus-keeping process is ensured by the aforementioned asymmetric cryptography.
You have probably come across the term Peer-to-Peer (P2P) network before, most likely in the context of file-sharing services like BitTorrent. In a distributed network the users don’t connect to a central server or entity to access a service, but to many peers. The peers are other network participants that provide the service to each other. P2P networks are very resilient, as there is no single point of failure. Blockchains make use of this concept and it is one reason why they are so robust. To create a transaction or view your balance, you ask other peers, or nodes, on the network that maintain a copy of the blockchain to share the information they store. You will often hear the attributes "permissionless" and "censorship-resistant" when reading about the value proposition of blockchain technology. The Peer-to-Peer network plays a significant part in giving blockchains these properties.
If you want to build a form of digital cash on a P2P network with many people participating, you will need to build consensus on the order of transactions. If a user has one TOPOS and creates two different transactions that spend that same coin simultaneously, some peers will receive version A first, while some others might receive version B first. The network needs to come to an agreement, or consensus, on which of the two transactions happened first. The consensus mechanism is what enables a large number of different entities that neither know, nor trust each other to reach consensus on the order of events.