All computers are prone to drift and as accurate timing is essential for many time critical applications, Network Time Protocol has been developed to keep computers synchronized
NTP is installed on most versions of Windows (although a stripped down version called SNTP is in older versions) and Linux but regardless is open source an free to download from ntp.org.
To synchronise a network it is preferable to use a dedicated NTP server that receives a timing source from an atomic clock either from specialist national radio transmissions or the US GPS system, although Internet time references are available but some are more reliable than others (and none can be authenticated leaving a system open to attack).
NTP is hierarchical, it is arranged into stratum. Stratum 0 is a timing source (such as an atomic clock) while stratum 1 is a server connected to a stratum 0 server and a stratum 2 is a computer (or device) attached to a stratum 1 server.
There is an understanding that if using a public Internet based time server, stratum 0 servers are not used by most applications as too many requests would disable them. Instead NTP should be configured to receive a timing reference from several stratum 1 and stratum 2 servers (it is good housekeeping to use more than one as it is possible one server could go down).
The most accurate and secure way of synchronising a network is to use a dedicated NTP server. These can receive a timing reference from either the GPS network (as each GPS satellite contains an atomic clock and broadcasts the signal) or a specialist national radio transmission. Both of these signals come from a stratum 0 source and both provide accuracy to within a few milliseconds.