If it was off when you did so, and it was just water, you should be ok. you'll want to dissasemble it as soon as possibleand seperate any of the connections that have water in them. If it got in the power supply, don't try salvaging the power supply, buy a new one. All the other components should be safe once they dry out.
Get a can of compressed computer cleaning air and thouraghly spray dry anything that got wet, then set them on a clean cloth to dry. If you can find them, those silicon beeds they put in beef Jerky packs can be useful if you have 5 or 6 of them in a sealed container to absorb moisture you can't get to. Definitly wait 24 hours for everything to dry before you attempt to turn it on.
The really critical sections are going to be the processor socket, the power lead sockets, the PCI-e sockets, the core voltage socket and any surface water remaining on the interface cards, or places where pooling could occur.
If the water got in the optical drive, consider just scrapping and replacing the dvd drive, as optical drives are cheap
if it got near the hard drives, you will want to check that it didn't get between the drive body and the drive controller board. If those are dry, you should be ok. if they are wet, you will need to remove the controller board carefully, dry underneith, then reattach it. That will require a special TORX style screwdriver bit. Avoid that unless you are pretty sure water got in though, as otherwise you could lose data if you reassemble incorrectly.
keep in mind water flows. Check any cables near the initial spill point and see if any water followed them down to sockets via Capilariy action.
If you spilled in a fan port, the fan will be fine as soon as it is dry. Other than that, just take your time and make sure its dry everywhere before you attempt to fire it back up.
If it was on when the water hit it, and it shorted out, let me know. If that's the case you probably ahve permanent damage, but many of your components should be salvagable.