Freezing fog occurs when the tiny water droplets come to the surface during fog when it's freezing outside.
For freezing fog to form the tiny water droplets in the air remain as liquid but then freeze when they get to the freezing part of the earth after they fall out of the air and land on things such as trees or other objects.
It's basically just like when rain falls onto things in the winter and then it freezes because it's so cold or when the water gets cold enough in the air it freezes as sleet or ice before it reaches the ground or contacts other surfaces.