When water, or any other liquid, is spilled on a computer's keyboard, it can result in a short circuit. The level of damage typically increases if the computer or laptop is turned on and connected to an outlet by an AC adapter.
Many modern computer keyboards include a rubber membrane between the keys' surface and the electronic circuitry inside the device. Therefore, the computer should always be turned off as soon as a spill occurs to help minimize the risk of damage. The keyboard should be left unplugged to dry for about two days before attempting to use it again.