From the Super Mario Wiki
Upon being used, the Princess's Drink will grant the user invincibility, as well as the ability to knock over any rival karts they run into, for five seconds. This item is functionally identical to the Star.
A variant of the item known as the Princess's Drink+ exists. This variant extends the duration of the invincibility.