If you're unlucky enough to have your MacBook come into contact with water, there are a few things you can do to try and salvage it.
First, power off the device as quickly as possible. If it's already on, hold down the power button until it shuts off. Then, remove any external accessories like cases or covers.
Next, use a soft, dry cloth to wipe away any water from the surface of the device. Be careful not to use anything abrasive that could damage the screen.
Once the exterior is dry, open up the MacBook (if possible) and use a clean, dry cloth to wipe down the interior components. Pay special attention to the keyboard and trackpad. If there is any water pooled inside, use a vacuum cleaner with the nozzle attachment to suck it out.
If you're able to get the water out quickly enough, your MacBook may just need a good drying off and it should be fine. However, if it's been exposed to water for too long, there's a chance that the internal components could be damaged beyond repair. In this case, it's best to take it to a professional for further assessment.
If you bring your Apple MacBook into a professional for repair, make sure you choose a location that has a "no fix no fee" policy. This way, if they are unable to fix your device, you won't be charged for the service.
Hopefully this article was of some help. Remember, acting quickly is key when it comes to water damage and your MacBook!