Some attacks require holding down the button for a certain amount of time, some require pressing buttons in a certain order, and some require good old-fashioned button mashing. Receiving attacks works in the same way. If you tap the button just before the blow is received, you can reduce damage a bit. Because your offense and defense are not normally adjustable, getting in these hits is almost always vital to success. Along with the bit of skill required in those, you also have to consider which attack to use, even when not using special abilities.
Jump tends to do more damage but divides it into two separate blows.
Hammer simply deals one great big blow that does less damage than the Jump would. Well, remember, damage is equal to offense minus defense. If each Jump has three power and the enemy has three defense, each Jump would do nothing. However, if your Hammer's one hit had five power, you would still cause two damage. Also, some enemies are immune to certain attacks.