By detecting patterns in documents that have already been translatedby human translators, Google Translate can make intelligent guesses as to what an appropriate translation should be.
This method involves not parsing sentences the way you learned to do in grade school but rather comparing lots of phrases with their existing translations (which Google did by downloading stacks of translated documents, like those from the United Nations).