The Rage Candy Bar is used to heal your Pokémon—it works just like a Potion.
If you check the item's description in your bag, it'll spell out exactly what it does.