the basic idea behind it is
you add an event listener to the testbox ( on the keypress event)
in that callback you use xmlhttprequest to pull the data from the server and then you display it in a div under the textbox
theres quite a few premade scripts of this already
if you want to use jquery theres a plugin to do this
download
jquery
download
jquery.suggest
then add this to your page (assuming the search box id is suggest)
code:
$(function($){
$("#suggest").suggest("files/search.php",{
onSelect: function() {alert("You selected: " + this.value)}});
}