According to the New York Times,
Users of the free application, which Apple is expected to make available as soon as Friday through its iTunes store, can place the phone to their ear and ask virtually any question, like “Where’s the nearest Starbucks?” or “How tall is Mount Everest?” The sound is converted to a digital file and sent to Google’s servers, which try to determine the words spoken and pass them along to the Google search engine.Since it searches your contacts as well, you could also use it as a poor-man's voice dialing app: it won't dial the contact, only find it.
Note that since the data is retrieved from Google's servers that a) oh, look: they are getting more user data, and b) there could be a lag between the request and when you receive the information.
Google also found a way to use the iPhone accelerometer (which, if you don't know, senses how the device is held) to activate the app and "listen" when the phone is raised to the user’s ear. Of course, that doesn't help those of us that use Bluetooth headsets exclusively.
I wrote about voice dialing on the iPhone earlier, and while that would be the application I would focus on for voice activated functionality (mostly due to safety concerns while driving), extending voice support across the iPhone's total OS would be a great move.
Microsoft's Voice Command (Windows Mobile) for example, allows you to fully control just about any feature of the phone, by voice. Now that would be awesome on the iPhone.