According to the Highway Code, you must use headlights when visibility is seriously reduced – generally when you cannot see for more than 100 metres (328 feet) or the length of a football pitch.
There's no obligation to use fog lights but if your car is involved in an accident in reduced visibility and its fog lights weren't on, then it may be queried by an insurer.
If you do use fog lights they must be switched off when visibility improves. This applies equally to front and rear fog lights.
When there's fog around visibility can seriously deteriorate in a matter of seconds. Be extra vigilant and drive only as fast as conditions allow and maintain a greater distance between you and the car in front.