Slow down to suit the distance you can see, and if really bad turn on the hazard lights so that anyone going too fast behind can see you. I have been in rain and hail that has reduced visibility more than fog, and it is not a nice experience. I have had to pull over twice in all my years due to rain, as it was just too dangerous to continue.
Living in Florida, we don't see too much of the fog issues except early in the morning. However, when it comes to torrential downpours we are masters. If you are riding in a torrential downpour (or driving, for that matter), please, please please! Do not hit your hazard lights and then sit in the fast lane of the Interstate going 45mph!
Yes, I have seen this all too many times.
As for the fog where you can't see. Pulling over is the absolute safest thing to do. The advice of turning off your lights when pulled over (I would pull WAY over) is something I had never thought of, but it excellent advice IMHO.