How does fog form?

There's mist and fog forecast in some places around the UK today but what's the difference between them and how do they form? Matt Taylor explains.