I use Google as a search engine. Can anyone explain how Google is able to respond to my query in mere fractions of a second with multiple sites?

I have typed in a few pretty weird things just to see if it could find a website...Google continues to amaze with speed and accuracy.

Just curious as to the "mechanics" of how the search engines work. Google is really impressive.

Thanks,
Wildcard