First of all, I feel that I must boast momentarily, and this is the closest thing to a relevant thread…
**I Just Qualified for the Magic Pro Tour!!! **
Woo-hoo!
**
Others have answered already, but I will add my two cents.
**
OK, let’s walk through things slowly. First of all, you’re in your main phase before combat. At this point you could play lands, play sorceries, cast creatures, etc. You do any of that that you want to do. Finally, all of that being done, you pass priority. Your opponent also passes priority. Now you are in your combat step. The first thing that happens is that you and your opponent each have another chance to play spells and abilities, although at this point, no sorceries, creatures, enchantments, or artifacts. This is when your opponent might cast a spell saying “tap target creature” or “target creature can not attack this turn”. However, at this point, all your opponent knows is that you are about to have the option of declaring some attacking creatures. She doesn’t know which, if any, creatures you plan to attack with.
Once you and your opponent have each played any such abilities you wish to play, you declare all your attackers. This is one of those things in magic that does not use the stack, it just happens. At one instant, you have no attacking creatures and an untapped darkling stalker. The very next instant, with nothing ever being on the stack or anything, you have a tapped, attacking darkling stalker. (Plus any other attacking creatures… all attackers are always declared simultaneously).
Now, to use the football field metaphor, your army of attackers is marching out of your end zone towards the 50 yard line. There’s now a long pause in which you and your opponent can both play spells or abilities. (By long pause, I mean that you can each play as many or as few as you like, but once you’ve both passed priority, the pause is over).
In your example, you have the option of activating your darkling stalker at this point (before blockers have been declared). You could, if you wish, make him 5/5 right now. However, there is almost never a reason to do so. After all, if he’s blocked with a 2/2 creature, you only need to make him 3/3. And maybe if he’s not blocked at all, you won’t pump him, but will spend all that mana on something else. So you pass priority.
Once you’ve both passed priority, it’s time for your opponent to declare blockers. Like attackers, all blockers are declared simultaneously, and it all happens without the stack. So you immediately move from the game state in which you have an attacking darkling stalker but no blockers have yet been declared, to the game state in which your attacking darkling stalker is blocked, and the plated spider is a blocker, and the plated spider is blocking the darkling stalker.
A couple of notes at this point:
(a) your darkling stalker has now been blocked. So even if the plated spider gets killed now, your darkling stalker will not deal even a shred of combat damage to your opponent unless it gains trample.
(b) at this point, if you have some ability which makes your darkling stalker unblockable, or makes the plated spider unable to block, it’s too late. You could cast an instant now that says “target creature gains forestwalk”, and your stalker would gain forestwalk, but it wouldn’t matter. Once a creature blocks another creature, it stays blocking it more or less no matter what.
OK, so your stalker has been blocked. At this point, there’s once again a pause in which you and your opponent can now play abilities. Now it’s time to pump up your stalker. A few notes:
(a) in 99 cases out of 100, it’s best to activate your stalker one activation at a time. That is, tap a swamp, pay one black, activate your stalker. When that resolves, he’s 2/2. Now tap a swamp, pay one black, activate your stalker. When that resolves, he’s 3/3. Etc. At each step, if your opponent decides to try to mess with you, you’ve kept as many of your resources open as possible.
(b) at this point, it’s almost certainly a mistake to make your stalker 5/5. Why? Because a 4/4 stalker is big enough to kill your opponent’s plated spider. And in magic, you usually want to save as many resources as you can, and do things as late as you can. Of course, if you only make your stalker 4/4, it will still die. But you’ll have another chance to pump your stalker later to keep it alive. And if your opponent has an instant spell that messes up the situation somehow (by bouncing your stalker to your hand, for instance), you want to have as much mana left open to do other things as possible. Of course, things might be quite different. Suppose you think your opponent has giant growth (an instant which gives target creature +3/+3 until end of turn). In that case, if you have sufficient swamps lying around, you might want to pump your stalker all the way up to 7/7 so that a giant growth can’t save the spider.
In any case, you’ve pumped the stalker up to some size or other, we’ll say 4/4 for now. You pass priority. Your opponent passes priority. Now, instantaneously, “damage goes on the stack”. The stack, as you’ll recall, is the mysterious place where spells and abilities go after they’ve been played but before they resolve. Well, there’s one other thing which can go on the stack, which always only goes on the bottom of the stack, which is combat damage. All of it goes on at once, and once it has gone on, its amount and distribution is fixed. So in our example, you assign 4 damage from the stalker to the spider, and your opponent assigns 4 damage from the spider to the stalker. (Neither of you have any choice about this). The damage is now “on the stack”, meaning that it is going to happen, and it’s going to happen in precisely those amounts. There are 4 little 1-point-of-damage detonation grenades hanging around in the air above the spider, and 4 others hanging around in the air above the stalker.
Now you and your opponent yet again have the opportunity to play spells or abilities. The most obvious thing to do at this point is play damage prevention spells or abilities, which say things like “prevent the next 4 damage that would be dealt to target creature this turn”. You play this spell. It goes on the stack. When it resolves, it creatures a “damage prevention shield”, which is basically a little magical force field that sits between the creature and the little grenades. The grenades are still there. They still know what creature they’re going to try to damage. But the shield will stop them from doing so.
Another thing that might be done here is to play a spell or ability that regenerates a creature. In this case, you could pay B and activate the darkling stalker’s other ability, “B: regenerate darkling stalker”. When you play this ability, it goes on the stack. When it resolves, a “regeneration shield” is created. This is a slightly different kind of magical force field surrounding your creature. Instead of preventing the damage from the grenades, it allows all that damage, and any other damage, to occur. However, if your creature is actually going to die from the damage, the regeneration shield leaps in, performs CPR, heals up your creature, taps it, removes it from combat, and vanishes in a puff of smoke. So the creature is never destroyed at all, never goes to the graveyard, never leaves play, etc.
An important note is that there’s no rule which says you can only play damage prevention or regeneration spells while damage is on the stack. So you’re perfectly free to give your stalker another +1/+1, for instance. Another type of spell/ability that is frequently played here is one that returns a creature to its owner’s hand. I attack with a 4/4, you block with a 4/4. After damage is on the stack, I return my 4/4 to my hand. Remember, those 4 little grenades are already hanging there in the air over your creature. So when damage resolves, bang, your creature dies, even though my creature, which did the damage, isn’t there any more.
OK, back to our example. Damage was put on the stack, with 4 damage assigned to each creature. While damage is on the stack, you activate your stalker. That ability resolves. He’s now 5/5. You pass. Your opponent passes. Now damage resolves. The game instantaneously goes from there being two creatures in play, one 5/5, one 4/4, and damage on the stack, to there being only a 5/5 stalker in play with 4 damage on it, and a plated spider in your opponent’s graveyard.
It’s just so simple! 
**
OK, remember back up above when damage went onto the stack, and you put 4 damage on the spider? In that situation, you had no choices involved. If your stalker had been 80/80, you would have had to put 80 damage on the spider. If, for some reason, you didn’t want the spider to die, you still would have had to put 4 (or 80) damage on the stalker. But sometimes you do have a choice about assigning damage. The two most obvious times are when your creature has trample, or when your opponent blocks with multiple creatures.
-If your creature has trample, and if its power is greater than the toughness of the creature blocking it, you have the option of assigning some of the excess damage directly to the player. So you have an 8/8 trampler. You attack. Opponent blocks with 4/4. You can assign 4 damage to the spider and 4 to the opponent (usually the right move). In this case, there will be 4 little grenades hanging over the spider and 4 hanging ove the opponent. Once damage is on the stack, those grenades will stay there, even if the spider changes toughness, is removed from play, etc. You can also, however, assign 5 to the spider and 3 to the player. Or 6 to the spider and 2 to the player. Etc. It’s your choice. And once you make that choice, it’s locked in. What you can not do is assign 2 to the spider and 6 to the player. (Well, you could do that if the spider already had 2 damage on it, but that’s neither here nor there).
-If your opponent blocks with multiple creatures, you can assign damage between those creatures however you like. So you attack with a 6/6 and your opponent blocks with 2 3/3s. You can assign 3 damage to each of them, which will likely kill them both (usually the correct play). However, you are quite free to assign 4 damage to one and 2 to the other, or 5 and 1, or 6 and 0, as you see fit. This can be quite relevant if your opponent has tricky spells of some sort. For instance, your opponent might have the instant spell “ramosian rally”, which would give all of her creatures +1/+1 until end of turn. In that case, if you assigned 3 and 3, your opponent could cast rally once damage was on the stack, and she’d end up with 2 4/4 creatures, each with 3 damage. Oops for you. If, in that case, you had assigned 4 and 2, at least you would still kill something.
** as discussed above, when you play a spell or ability that says “regenerate target creature”, what you’re really doing is creature a magical shield that hangs around, waits for your creature to be in the process of dying, and saves it. Magical shields, either of the damage-prevention sort or the regeneration sort, always vanish at the end of each turn if they are unused. (Nothing in principle stops Wizards from printing a card that says “prevent the next 3 damage that would be dealt to target creature for the rest of the game”, but they never do, probably because it would be logistically tricky to keep track of such things.