From Sonic Retro
The Hammer Attack is Amy Rose's standard offensive move, appearing in all the games where she is playable. Unlike the main heroes - Sonic, Tails, Knuckles - Amy is often shown without the ability to perform a spin attack, and so instead she relies on her skill with the Piko Piko Hammer to smack enemies. A Hammer Attack sees her haul the giant mallet out and whack opponents.
There are a number of variations on the standard Hammer Attack; using it while jumping is called the Jump Attack or Super Hammer Attack. Amy has a whole range of other Hammer-using techniques, including the circular Spin Hammer Attack and the vaulting Hammer Jump.
In the rare occasions where other characters have gotten access to a Piko Piko Hammer, they can use a Hammer Attack too. Tails does so with the Hammer item in Tails Adventures, while characters partnered with Amy get their own mallet in Sonic Advance 3.