When one visits http://maps.google.com, they are able to type queries into the search field and receive results based on locations or places, and not hard search results, as the
What you are looking is Geocoding API from google maps.
Find Documentation here
UPDATE 5/12/2011
Google just opened up public access to their Places API. This is more to the heart of the original question request:
http://code.google.com/apis/maps/documentation/places/autocomplete.html
I think you're looking for the google.maps.Geocoder class:
A service for converting between an address and a LatLng.