Network Time Protocol, or NTP, is a network protocol that is used for synchronizing the time of computers. NTP is described by RFC 5905.
NTP is a very simple protocol. You just send a fixed-size struct to an NTP server using UDP, and you get a reply with the time fields of that struct filled in.