Planeswakers go to the graveyard when the no longer have any loyalty counters on them. The number of counters on them will vary depending on how many them came into play with and which of their abilities are played. Counters are also removed when a planeswalker is dealt damage. For each point of damage a planeswalker receives it will lose one loyalty counter.
There are two main ways that a planeswalker can be dealt damage; via combat or via spells and abilities that are controlled by an opponent. Dealing combat damage to a planeswalker is pretty straight forward. It happens when a planeswalker is attacked and the attacking creature is unblocked or the attacking creature has trample and power greater than the toughness of the creatures blocking it.
Dealing damage from a spell or ability (non-combat damage) is a little more complicated. Anytime a player resolves a spell or ability that would deal damage to an opponent the controller of the the spell or ability can choose to have that damage dealt to a planeswalker that player controls instead. In other words you can choose to have spells and abilities you control deal damage to your opponent’s planeswalker instead of your opponent. This is your choice, not your opponent’s. Also, it is not possible to have spells that you control that would deal damage to you deal damage to a planeswalker you control instead. This is not a decision that either the controller of the spell or any opponent can make. So if you were to play Volcanic Fallout, you will end up taking two points of damage, this damage cannot be redirected to a planeswalker you control.