The classification of different beer types comes from how they are made. The first distinction is top-fermenting vs. bottom-fermenting, i.e. does the yeast get thrown in on top and work its way down the mash, or is it the reverse.
- Top Fermenting = Ale
- Bottom Fermenting = Lager
In general, lager yeasts are more sensitive to temperature control during brewing and result in a subtler and cleaner flavor. Pilsners and most German beers are of this type. Ales tend to have a larger variety of yeast strains used, so don't have as consistent a profile as lagers. (There's exceptions of course, Schwarzbier is as dark and malty as they come.)
All other styles are a result of their ingredients, locations and histories. Most have a specific quality such as Labmics, which are a sour beer that uses spontaneous fermentation. Rauchbier (also known as Smoked Beer) have a distinctive smoky flavor and sometimes are actually smoked before bottling. (And, frustratingly, can be either a lager or ale before being smoked).
Beers that use Wheat as one of their malts tends to make another broad category of ales such as the Hefeweizen and Whitbier.
Not every category is so easy. You'll be hard pressed to find a beer expert who can quote the differences between a Porter and a Stout without speaking in generalities and flavor profiles. Similarly, since the naming of beers isn't regulated everywhere in the world what is one breweries "American Pale Ale" is an others IPA.