Entire books have been written on Ajax. It's certainly too big a topic to post a tutorial in a forum post. Search the web for tutorials or purchase a book
Ajax in Action, though a bit dated, is a good one, as is
Head First Ajax.
You might also start here with
this article.
Keep in mind that once you learn the fundamentals, you do not want to write Ajax code without the help of a JavaScript library such as jQuery or Dojo -- there are too many browser dependencies and nuances to go it alone.