A blockchain is a type of distributed ledger, meaning that it is a shared digital record of transactions that are maintained and updated by a network of computers. A blockchain is a specific type of distributed ledger that utilizes cryptography and a distributed consensus system to secure its data and ensure only legitimate users can access the data stored in the ledger. The most distinguishing feature of a blockchain is that its data is immutable; once a transaction is added to the blockchain, it cannot be reversed or altered by any party.
A distributed ledger is a broader term that is used to describe any technology which records and stores data across multiple computer systems, allowing users to access and share data in a distributed way with other users. Distributed ledgers can be public or private networks and can utilize various technologies for data storage and sharing, such as blockchains, DAGs (Directed Acyclic Graphs) or other cryptographic techniques. They do not have to be immutable or secured by cryptography like blockchains.