PCs have two clocks; the first is the hardware or "real-time clock" (RTC), a small battery powered module on the motherboard that maintains timekeeping when the PC is switched off, disconnected from the mains or a source of power.
The battery powering the clock generally lasts for between three and five years and towards the end of its life the clock will slow down or become erratic. Look out for warning messages at boot up, including the really helpful "CMOS checksum invalid", and "Invalid configuration run Setup".
Replacing the clock battery is not usually too difficult, and they normally only cost a few dollars, but seek expert help if you don't fancy the idea of opening up your PC.
The second PC timekeeper is the "software" clock which is built into Windows. At boot up Windows receives data from the RTC to set the clock and then uses system timing signals to keep the display clock ticking.
Nevertheless, the time on all standalone PCs can and does drift if the only source of reference is the RTC.
The best way to ensure accuracy is to log on to a "Network Time Protocol" (NTP) server on the internet.
These web sites give highly accurate time and date information derived from atomic clocks. Delays and errors introduced by the Internet, including the distance between the PC and time server, can be compensated for and it's possible to ensure that your clock is never out by more than a second, as well as correcting any errors in the PC's date settings.
Windows XP has an Internet time facility built in. When online, double-click the clock display, select the Internet Time tab, click the Update button and Windows checks and synchronises the clock with the two default NTP servers (for a list of alternative time servers go to: http://www.ntp.org/).