Your bike needs to be gently hosed to get the worst of the mud off, then washed with car shampoo, washing up liquid or whatever, using a sponge and a nylon brush to get at the stubborn bits. Pay attention to the chain, sprockets and gears and rinse off again by hosing it down gently. Be careful not to squirt high pressure water onto any of the bearings (crank, hubs etc),
Just as important as cleaning the bike is to make sure it's lubricated more or less as soon as you've washed it. The bike needs to be reasonably dry, so you need to "bump" off the excess water, or wipe it off with a dry sponge or chamois. Turn it over and spin the pedals to spin the water off the wheels, gears etc. While you've got the bike upside down turn it to see whether you get any excess water out of the seat post or drain holes in the chainstays.
From here you will get loads of different advice about lubricating, but I use GT85 to spray onto the rear cassette, and onto the front and rear mechs. I also squirt it into the shifters more to displace water than lube them.
I then use Finish Line wet lube for the chain. Put the bike into middle chainwheel, middle gear, and drizzle the oil along the section of the chain available to you. Turn the chain the same length so that a new portion is available to oil, and do this until you've done all the chain. Use a rag to wipe of the excess, again, a section of the chain at a time, then turn the pedals whilst working the shifters so that the newly lubed chain comes into contact with all the sprockets on the cassette.
I won't preach about retaining showroom condition.......