What resolves first? Creatures abilities or instants?
Yes

In this example, the Longtusk Cub's pump ability is placed on the stack, Shock is placed on the stack and the stack resolves in reverse order. Shock deals 2 damage to a 2/2 creature, killing it; the pump ability fizzles as its 'target' is no longer on the battlefield.

A couple of comments on the way you've worded your question:


  Does shock take effect, since its an instant, before Long Tusk becomes a 3/3?


The fact that Shock is an instant is irrelevant on when it will resolve, that's what the stack is for. The stack is what determines in what order effects are applied to the game. Shock being an instant allows you to place it on the stack at a good time - as a reaction to your opponent activating this pump-ability.

Also, in this case, it doesn't matter whether you declare blockers or not, or even if all of this is in the attack phase.