It's making an ajax call to a server method, internally it's doing some sort of matching based on popular searches or combinations of words in order to suggest likely words.
The 'Auto Complete' section is straightforward enough....you can accomplish the same using something like jquery autocomplete (
http://jqueryui.com/demos/autocomplete/[
^]) or similar.