Ajax in Apex: introduction and techniques

How to use ajax in apex? What exactly does it do? What can i do? Why doesn’t it work? How can i get values from the database on my page? All are frequently asked questions and i just want to cover...