Since I have been around engines a long time, getting them wet doesn't bother me. I pull the covers off top and bottom and wash the insides along with the out side. But when I do I use very hot water and have spray cans of oil ready to hit the internals with after it drys a bit. I also don't let them set for days on end afterwards. They are either taken clear apart or fired up and ran with in a day or so.
If you are new to engines, plug every hole you see and wash away using degreaser and scrub brushes. Soak it a couple of times with degreaser a day or two before washing to give it time to work.
With the engine on a stand or on its side, you can clean the top end (rockers and valve area) with spray cleaners and brushes. Keep the engine layed over and the crud will fall to the side and not down in the engine. Same for the lower end. When you are done, hang the engine over a large pan and pour some kerosene or mineral spirits all around the top end and let it run through the engine to flush the loose stuff out. Don't forget the side covers.
For a really dirty engine, keep the covers on and fill it with diesel fuel and let it set for a week or so, then finish up with pulling the pans for a check and clean up as described above if needed.
Don't forget to power flush the coolant areas. Pull the small clock drain plug on the left side to really get it cleaned out. You will be suprized how much rust and crude will come out of a good working coolant system.
Joe