How is beer classified into different types?
http://beeradvocate.com/beer/101/ has a vast amount of information on beer styles.

To answer your specific question, an ale is top-fermenting whereas a lager is bottom-fermenting. Lagers are generally fermented at lower temperatures than ales.

I believe that lambics would constitute a third category, since they are traditionally fermented by wild yeasts, but opinion may vary on this, I don't know.

There are dozens of styles of ales and lagers and a few different lambics, but the method of fermentation is the main distinguishing characteristic between the three types.