Hashing algorithms :-)
In ultra short words. Block-chains of hashes.
Think of it like an action log, where each log entry contains the hash value of the preceding log entry. By walking the whole block chain, you can/must validate that each hash value matches the content of the preceding log entry (you do that usually only once and then stay current with recent hashes). To write into the log, you need to be fast or you are forced to wait and hash & revalidate the latest log entries again. This is similar how Ethernet works except that each client doesn't get notified about collisions.
Because of all those linked hashes, it's pretty hard to inject or manipulate history data. But it's also very computation heavy.