In the example, search.php is the file name of the server code that manages data in, query performed, and data back out in JSON format to Autocomplete in the client. Here's a tutorial about server code to support Autocomplete - in several languages.
http://www.jensbits.com/2010/05/29/using-jquery-autocomplete-to-populate-another-autocomplete-asp-net-coldfusion-and-php-examples/I don't understand your question about a trigger. Autocomplete knows how and when to contact the server for data - when it is set up correctly, of course.