If you had to write out every database change to disk immediately after it's made, the database performance would really suffer. This is particularly true on blocks that you change all the time, which would then be written very often. But you have to be able to recover if the server crashes before things are written out completely too. Periodic database checkpoints take care of that.
A checkpoint iterates over every dirty block in the system as of a point in time, writing them out to disk. Then that information is flushed to permanent storage, via the same mechanisms WAL writes are. Once that's done, if your system crashes, recovery from the crash will start from this new last point where the database was sure everything on disk was consistent. In this way, the database constantly moves forward the recovery starting position to the point in time the previous checkpoint started at. Everything that happened to dirty blocks before...