Some road bikes have fender eyelets on the fork and near the rear dropouts (newer eyelets are a bit hidden to preserve the aesthetic on some models). You just buy the fenders and put them on. I'd say most non-race bikes will have them, and ones which are commonly used for commuting or touring will almost definitely have them. Then you buy a set of fenders, and bolt them on.
You can also use clip on mudguards and fenders (e.g. to the seatpost), like the SKS X-board and SKS X-tra dry.
This style clips onto the downtube in lieu of a front fender:
This style clips onto the seatpost as a rear fender:
Another style is this (from Planet Bike):
These don't provide all the benefits of a proper fender (e.g. protecting the drivetrain) but block some of the mud and water and can be mounted on any bike, even a mountain bike:
Finally, some people just get wet and dirty or don't take their road bikes out in the rain. Note that road bikes generally don't throw up as much crud up as mountain bikes since their tires are smaller.
My road bike has a SKS X-tra Dry seatpost rear fender, and the front is just plain. It uses 700x28 tires, and I find that the front doesn't throw all that much up that I care about it too much. The rear is pretty well covered by the seatpost fender, so I don't have skunk stripe.