It is obtained in the first two games by hitting a Whacka. It recovers 25 HP and 25 FP. Only eight of these can be gotten before the Whacka disappears.
In Super Paper Mario, the Whacka Bump can be purchased at the arcade for 300 Flipside Tokens. A Whacka can be found on Chapter 5-1 at the far right wall. Mario must use Dottie to shrink and then flip to 3D. The Whacka is found in the hole. If a Whacka Bump is cooked, it creates a Roast Whacka Bump.