From Danny Sullivan at Google: Autocomplete is a feature within Google Search designed to make it faster to complete searches that you’re beginning to type.
These autocomplete “predictions” rather than “suggestions,” because autocomplete is designed to help people complete a search they were intending to do, not to suggest new types of searches to be performed. These are our Google’s best predictions of the query the person were likely to continue entering.
How does Google determine these predictions?
They look at the real searches that happen on Google and show common and trending ones relevant to the characters that are entered and also related to your location and previous searches.
The predictions change in response to new characters being entered into the search box. For example, going from “san f” to “san fe” causes the San Francisco-related predictions shown above to disappear, with those relating to San Fernando then appearing at the top of the list: