Take it into a dry place after riding in the rain. Wipe it down, dry it off, and you don't have to be too fastidious about this. Then lightly lube the chain with your favorite substance (there's a current discussion on chain lubes in one of these groups), and wipe off the excess. And give the bike a bath when it gets especially grimy--bucket of soapy water or bottle of household spray cleaner, rinse, dry, and lube chain. Don't shoot water under pressure into bearings, but don't worry about dripping. Just wipe dry when you're done.
Dirt that stays on the bike works its way into moving parts and causes them to wear out and break sooner. It's better to wash old dirt off and get dirty all over again than to let old dirt fester.