From the Super Mario Wiki
A Bumper Ball is a large red ball that appears in Yoshi's Story. It has four blue arrows pointing on each side. These obstacles normally hook with chain lines that appear on the screen. They also normally move at the left or right side of the wall. If a Yoshi bumps into one, the Yoshi is bounced back. Additionally, some Bumper Balls are designed to move fast to bounce the Yoshi more forcefully. In some cases, the Yoshis can use these objects to reach a higher part in the level. These obstacles cannot be destroyed by throwing a Yoshi Egg or Ground Pounding them. Bumper Balls appear in several levels and can cause a loss of life if hit from the underside.