Responding to your edit:
What I really wanted to know is that if someone uses for example Shock
on my creature can I say at that moment "Ok, I will spend 2 mana and
regenerate my creature" or when that Shock is played it is resolved
immediately any my creature is destroyed (assuming that it has 1
toughness and no regeneration shield on it)
How the rules of Magic work is as follows:
Your opponent pays 1 red mana and casts Shock. Shock is now placed "on the stack". Assuming that neither you nor your opponent want to play any spells or abilities in response, Shock "resolves", your creature takes 2 damage, and, assuming its toughness is 2 or less, goes to the graveyard.
However, you do want to do something, which is regenerate your creature! With Shock on the stack, you say "in response, I regenerate" and pay your mana. This puts the ability on the stack, on top of Shock. Now, assuming neither you nor your opponent want to play any more spells or abilities, the objects on the stack start to resolve from top to bottom (LIFO), thus the ability resolves first and a regeneration shield is created. Now Shock is at the top of the stack; assuming neither you nor your opponent want to play any more spells or abilities, it resolves, and your creature is dealt 2 damage, though this time it survives thanks to the replacement effect provided by its regeneration shield.
Here's an interesting case for you: your opponent casts Shock on your creature. In response, you tap two lands, and use your creature's regeneration ability. In response to this, your opponent taps for another red mana and casts another Shock from his hand! You may at this point be out of mana and unable to respond by using the regeneration ability again. In this case your creature is toast, despite trying to regenerate, as the second Shock will resolve before anything else...
Hope this helps you visualise how the stack works - it's quite hard until you suddenly "get it", and then it's pretty easy, I promise you!