The first thing to know about fog is that its effect is more pronounced with distance. The best is to get as close as possible. Do not zoom in, get closer instead. Don't fall into the cliff though!
Second is that fog reflects light. Do not flash it. Shoot it from an angle where the fog receives the least light from other sources, such as street lamps.
Increase contrast, in camera, if possible. You may be able to dial in an additional increase for contrast in shadow areas, depending on your camera (most Pentax DSLRs and Olympus mirrorless can do this, a few others can too). On some Nikon DSLRs, you can also increase Clarity which does wonders for fog. A bit of an increase in saturation can help too. This is where you have to experiment.
When you find good settings, save them. Fog is quite a distinct case that most of my DSLRs have a User setting which I have made specifically for fog. Don't forget to switch bag to normal once the fog is gone.
While you still have a low-contrast image, your histogram will not reach both sides. This is a good time to expose-to-the-right (ETTR). It will give an image which looks probarly overly bright but you will have more latitude do correct the lack of contrast in software this way. Since this change affects exposure, it will help even if you shoot RAW or DNG. If you do not shoot JPEG at all, the previous two paragraphs do not apply.
Once the image is captured, repeat the third paragraph with an image-processing software. You will have the chance to increase contrast and clarity, plus adjust the final exposure to your liking. For an image which already had good contrast overall but still does not show much details in foggy areas, you can fine-tune results via the curves too.
Know your camera's sharpness settings, it often has a -5 to 5 or 0 to 9 scale. The default is around the middle. You can increase a few steps to improve sharpness but too much and you will see sharpening artifacts, so learn that limit. If you go too far, even noise gets sharper!