Computer clocks drift, each at its own slight pace, and in a network of many machines even small disagreements cause trouble: events logged out of order, security checks that depend on time, and data that cannot be reconciled. Time synchronisation keeps clocks across many machines closely aligned to a common reference.
It works by repeatedly comparing against trusted time sources and gently adjusting, accounting for the delay of the network itself. It is invisible when it works, and the source of baffling, intermittent bugs when it quietly fails, which is why it is treated as basic infrastructure.