Each time all players pass in succession, the spell or ability on top of the stack resolves. What "resolving" actually means depends from the type of the object that's resolving.
Resolving instants, sorceries and abilities
Instant spells, sorcery spells and abilities resolve in a three step process:
First, if the spell or ability specifies any targets, it checks if said targets are still legal. A spell or ability doesn't resolve ad it's removed from the stack if all of its target are now illegal. When a spell doesn't resolve and it's removed from the stack because all of its targets are illegal, we colloquially use to say that it fizzles.
Example. Dark Betrayal calls for a target, which must be a black creature. As Dark Betrayal begins resolving, we check if the target is still legal. If it's not - for example because it's not black any more, has gained protection from black, or has left the battlefield - Dark Betrayal doesn't resolve and it's removed from the stack.
If the spell still has at least one legal target, it will resolve. It will not be able to affect in any way a target that's become illegal, but will do as much as it can to legal targets.
On the other hand, if I cast Electrolyze on two different targets, for example two Dark Confidants, and one of those becomes an illegal target, Electrolyze will resolve and it will perform all the possible actions: it will deal one damage to the "legal" Dark Confidant and make me draw a card.
After this check, the controller of the spell or ability follows its instruction in the order written.
Example. Akroma's Vengeance destroys each artifact, creature and enchantment as a single action, so all affected permanents are destroyed at the same time. If a Boon Satyr is on the battlefield, it's destroyed once, so you can save it with a single regeneration shield.
On the other hand, Austere Command performs the two action chosen one after the other. If I choose the second and the third modes, the Boon Satyr will be destroyed twice, and two regeneration shields will be needed to save it.
Sometimes, an instruction on a spell or ability requires both players to make choices or perform actions at the same time. In these cases, active player makes his choices first, then non-active player does - this is known as APNAP order. Then the actions are performed simultaneously. Then the spell moves to the next instruction.
Example. Each player loses 1 life, then the first choice for Smallpox is discarding a card. Active player chooses a card, then non-active players chooses a card, then all cards are discarded simultaneously. Since the hand is a hidden zone, players can't see each other's choice until the card is actually discarded. Let's move on: active player choose a creature to sacrifice, then non-active player chooses a creature, then all sacrifices happen simultaneously. Non-active player can see what active player has chosen before making his choice, because the battlefield is a public zone. The same happens for lands.
Drawing cards is an exception to this rule. If a spell instructs all players to draw some number of cards simultaneously, first the active player draws that number of cards, one card at a time; then the other players do the same in turn order.
Example. We both control a Laboratory Maniac and have no cards left in our libraries. I activate the first ability of Jace Beleren. When the ability resolves, first I try to draw a card. The replacement effect of Laboratory Maniac is applied, so I win the game on the spot.
Leave the stack
The last step in the process of resolving a sorcery, instant or ability is to dispose of the object on the stack. If it's a spell, the associated card is put into its owner's graveyard; if it's an ability, the object on the stack simply ceases to exist. A notable implication of this is that a sorcery or instant card stays on the stack throughout its resolution, which means it's not in the graveyard to be counted, exiled or moved somewhere else, and it's a legal target for counterspells.
Example. Do you want to see a bad card? Look no further than Ire of Kaminari! You can cast it while your graveyard is empty (for example to trigger good man Horobi, Death's Wail), but since upon resolution Ire of Kaminari is still on the stack it would do a grand total of 0 damage to its target.
On the other hand, if my opponent casts Counterspell on my precious Ire of Kaminari, I can respond with Ricochet Trap. As Ricochet Trap is resolving, it's still a spell on the stack, which means it's a legal target for Counterspell. As such, I can change Counterspell's target to Ricochet Trap, then the Trap finishes resolving and is put into the graveyard. When Counterspell resolves, it will see that its target (Ricochet Trap) is not legal any more, since it has changed zone, and will fizzle.
Resolving permanent spells
If the object that's resolving is a permanent spell, its resolution involves a single step: the spell card becomes a permanent and it's put onto the battlefield under the control of the spell's controller. A permanent spell is a spell with at least one of these types: creature, artifact, enchantment, planeswalker. Lands are permanents as well, but are never cast as spells.
There's an exception to this rule: Aura spells are permanent spells, but they have a target, even though the word "target" does not appear in their rules text - it's actually hidden in the definition of the enchant keyword. Aura spells resolve in two steps, exactly as instants and sorceries do. First the Aura spell checks if its target is still legal; if it is, it enters the battlefield attached to the object it was targeting, otherwise it doesn't resolve and it's removed from the stack.
Sometimes, an Aura enters the battlefield without being cast. In this case, it's controller must choose an object that conforms to its enchant keyword, and the Aura will enter the battlefield attached to it. Note that this is not targeting, so you can choose permanents with shroud or hexproof; however, a permanent with a relevant protection can't be chosen this way, as the Aura can't be attached to it.
Example. As I cast Dead Weight, I must choose a target for it. As Dead Weight resolves, it will enter the battlefield attached to that creature. If my opponent responds giving that creature hexproof with Ranger's Guile, Dead Weight won't resolve and it'll be removed from the stack and go straight from the stack to my graveyard.
Now I cast Sun Titan and choose the Dead Weight in my graveyard as the target of its triggered ability. Since I'm not casting Dead Weight as a spell, I don't need to choose a target. As the ability resolves, I'll pick a creature and return Dead Weight to the battlefield attached to it. I'm not targeting the creature, so I can choose one with hexproof (this was a very popular way to dispatch an opposing Geist of Saint Traft). However, I can't choose one with protection from black, such as a White Knight, because Dead Weight can't be attached to it.
|Casting a spell||On the stack||Countering spells|