it checks whether the file is there, if it is, it then gets the md5 checksum from the webserver and compares it with that of the file that is currently on your pc, if they match it is fine, if they don't, it will download it from the webserver
read more about md5 here