Do NOT turn it upside down. Its the worse thing you can do!
Why? Because your keyboard has multiple layers and the liquid usually stays on top. Once you turn or tilt your machine, it will get between those layers and inside your laptop and possibly damage the logic board.
Unless it shortened out, unplug it from the MagSafe charger and turn it off. Grab some paper towels and let it soak up the liquid. Don't try to turn it on again.
Depending on the liquid your Macbook might be ok. Sugary drinks, milk, chocolate milk and red wine are the worse, because once dry can cause more issues.
From here on, try to find an independent Apple Repair Tech, who has experience with liquid damage. Apple will charge you anywhere from $750 - 850 to replace the affected parts - it also voids your AppleCare. If your laptop is still under AppleCare, there are ways to clean the liquid traces and still keep the coverage. In most cases only a new keyboard and other minor parts are needed to get your machine back to its old glory. Unfortunately, in some cases nothing can be done, besides replacing the logic board, which is the most expensive route unfortunately.
Let's just hope it will never happens and if it does, don't panic!