You can defeat the bosses in Sonic Dash by following the instructions below, but remember it can take a bit of practice!
First, the boss will fire projectiles towards you. If you dodge enough projectiles you'll hit a spring, jump up into the air, and you'll be able to attack the boss.
To successfully attack them, you'll need to tap the screen at the right time.
First, you'll notice two crosshairs moving towards each other across the screen. To attack, wait until these crosshairs lines up and then tap the screen. If you're successful, your character will attack the boss; attack them three times in a row to defeat them.