Performance at key gameplay/plot points
Some games offer multiple endings, depending on how the player performs at key events within the game. For example, Metal Gear Solid has two different endings depending on how the player performs in a torture mini game, midway through the game. If the player succeed at the mini game and does not submit to the torture, the character Meryl Silverburgh will still be alive at the game's conclusion. However if the player fails the mini game and submits (without dying, which results in game over), Meryl will die and never appear again. The latter ending is considered non-canon as Meryl appears in the sequel Metal Gear Solid 4: Guns of the Patriots, making the assumption that Snake never submitted to the torture.
The Resident Evil series is also known for having multiple endings depending on how well the player did in the game and what decisions they made. The game scores the player based on how much ammo they've used, the number of times they've saved, died, healed, etc. In addition, the endings (particularly in the original Resident Evil) also depend on plot-related decisions, such as whether the player is present at certain events and what decisions they make when interacting with other characters. On average, most main Resident Evil games have at least three different endings to explore. However this trend has been put to rest with the release of Resident Evil 4; both it and Resident Evil 5 only have a single ending.
The ending of Fallout 3 also changes based on key gameplay/plot choices. The player can decide whether or not to infect the water, which will make further changes to the end sequence as well as the moral choices mentioned previously.
Good vs. Evil (gameplay moral choices)
Many games include multiple endings to reflect the moral choices a player has made during his play-through. In games such as Shin Megami Tensei, Tactics Ogre, Guardian Heroes, Knights of the Old Republic, inFamous, or Fable, the game's ending is dependent on how the player has acted throughout the game based on "good" and "evil." If the player has killed innocent people, allowed an excessive amount of collateral damage, or generally put their own needs above those of others, the "evil" ending is played at the end. Similarly, if the player does the opposite and goes out of their way to help and protect people, they receive a "good" ending. Neither ending is considered "wrong" or "incorrect" since it's the story of the player's character, although some games follow a certain canon - for example, the canon story of both Knights of the Old Republic games has the character acting in a "good" manner.
These types of "multiple endings" have been criticized by some for relying too much on key story points to dictate the ending, instead of analyzing how the player acted throughout the game. For instance, in Fable you can choose to be the kindest soul in the entire world, but at the very end of the game, you're still given the option to enslave all of humanity and have them bow down to your immense power. Similar issues are relevant inmost games that give a "Moral Choice." Some games featuring moral choices, such as Shin Megami Tensei, Tactics Ogre, and Fallout 3, do take into account all moral choices made throughout the game when deciding which ending sequence to display.
There are also games that feature endings based on branching storylines, depending on which "path" or "route" the player has taken through the game's narrative. These narrative paths are usually determined by the choices the player has made at various points throughout the game, including dialogue choices and moral decisions, which can change the storyline considerably and lead to drastically different outcomes. This approach tends to be most common in the visual novel genre, though there are also some examples among games in the RPG, adventure and action-adventure genres.
Some games, again mostly visual novels, take this approach further and encourage players to view all the endings in order to fully understand the game's overarching narrative. For example, various endings might give differing perspectives, with the plot elements that may not make sense in one ending making sense in another ending; by viewing these differing perspectives, the player thus gains a better understanding of the game's overarching narrative. This approach was largely pioneered by the visual novel Yu-No, and has since been used in many subsequent visual novels (such as Clannad, Fate/stay night, 428, Steins;Gate, and Zero Escape) as well as some adventure games (such as Shadow of Memories), action-adventures (such as Way of the Samurai), and RPGs (such as Drakengard and Radiant Historia).