At first level a Ranger selects a type of creature from the favored enemy list. At 5th level and every 5 levels thereafter (10th, 15th, and 20th) the Ranger selects an additional creature type from the favored enemy list. When fighting a Favored Enemy, you gain +2 Damage for each Favored Enemy feat you have. If you have more than one Favored Enemy feat that applies to a particular Enemy, the damage applies for each type that matches a favored Enemy feat you have.
Notes
If a creature is affected by two Favored Enemy selections (such as a Chaotic Evil Outsider attacked by a character with both FE: Chaotic Outsider and FE: Evil Outsider) then both effects stack (SourceARCHIVE ME!).
If that same Gnome character was a Level 20 Ranger, they would also have their 5 base Favored enemies from 20 Ranger Levels, for +14 to all 7 Favored Enemies.
Dark Hunters, an archetype variant of Ranger, have a very limited selection of Favored Enemy types to choose from. These are, in total: Aberration, Animal, Elf, Human, Monstrous Humanoid, and Vermin. These otherwise work identically to a standard Ranger's Favored Enemies.
Specific exceptions or examples are listed in parenthesis after the race. Click each race (or type) to go to its page, where you can find detailed descriptions and a list of all monsters of that race (or type).
Note that not all monster types are available for selection as a Ranger's Favored Enemy, nor are all found as Bane effects on weapons.
1) For Outsiders, a Ranger may select "Chaotic Outsider", "Evil Outsider", and/or "Lawful Outsider" (each separately). The "Race" category of the monster does not distinguish by alignment, so these Favored Enemies tend to overlap some Outsiders and miss others. Mephits are "True Neutral", not Chaotic, Evil or Lawful, and so are not covered by any of a Ranger's possible choices.
Incorporeal creatures fit multiple types above (e.g. Evil Outsider, Undead). Both Lesser and Greater Incorporeal Bane exist in game, on the Phase Hammer, Assassin's Kiss, and Epic Assassin's Kiss and on randomly generated Cannith Crafted weapons. Note that Incorporeal Bane does not imply Ghost touch.
Natural bane, a designation found only on historic randomly-generated and historic Cannith Crafted weapons, covers all of Animals, Vermin, Magical Beasts, Plants and Fey.
Unnatural bane, a designation found on Hunter's Slayer, randomly-generated weapons, and Cannith Crafted weapons, covers all of Monstrous Humanoids, Aberrations, and Undead.
Ooze bane does not make a weapon immune to breakage or splitting. (See Everbright)
Note that several races are listed under multiple types. This is unavoidable, as certain factors cause monsters of the same race to fall under different types. For example, most blue dragons are Dragon type, but Auraxyllon and Eternity are undead, and so fall under the Undead type. The same goes for undead beholders, humans, and rats. Similarly, "Evil Outsiders" may or may not also be "Lawful Outsiders" or "Chaotic Outsiders", and so on.
Note on choosing a bane weapon: The general rule of thumb is to choose the bane type that corresponds to that particular monster's type, not race. In the example above, Auraxyllon is affected by undead bane, but not by dragon bane, even though it is a blue dragon. Likewise, Death Knights are affected by undead bane, but not human bane. The exception to this rule is that monsters of any of the various outsider types can also be affected by lawful outsider bane or chaotic outsider bane if those monsters are lawful or chaotic, respectively.
For more information on Dungeons & Dragons monsters, you can visit the D20 SRD: Monster page.