The write ahead log is an append-only file that records all the changes that take place on the master node. In the context of a database it is a sequence of bytes. Depending on the storage engine in a database, this log can be:
The log that stores data for SSTables and LSM-Trees.
A log to track every change when the storage engine is a B-tree. In this scenario individual disk blocks are overwritten but the change is first recorded in the log so that the index can be restored to a consistent state after the crash.
Outside the context of databases, WAL or a form of it is commonly used. For instance in the Hadoop distributed file system, the metadata about the files is maintained by an entity called the Namenode. The Namenode follows a master-slave model, where the master or active Namenode maintains an up to date metadata about files. As changes to the filesystem occur they are recorded in an edit log. The slave/passive Namenodes observes the changes showing up in the edit log and applies them locally thus keeping its data in-sync with that of the active Namenode. In case, the active Namenode crashes, the passive can take its place.
Another popular distributed system Kafka is based on WAL