Pretty much as Kevin says... except .... at high altitude (low pressure) and cold temperatures (-40 odd) water vapour occurs in a "supercooled" state and is basically hanging about doing not a lot, in order to form a water droplet it has to condense onto something, it cannot just form a drop ... (this does occur when water crystallises and forms snow but at very different pressures and temperatures) ....
The exhaust from the engine contains unburned hydrocarbons and soot, emitted at high temperatures, this causes the "local" temperature to rise and the soopercooled droplets can then form water droplets by condensing onto the soot particles, and you get the "vapour trail" you see .. starts about 100 metres behind the aircraft. How long it "lingers" depends on the meteorological conditions .. some last hours, some just a few seconds, but as conditions change the water droplets return to vapour and the trail vanishes.
A military pilot will take a great interest in when this occurs as the trail is a huge give-a-way as to his position, vapour trails being visible from many miles away, even we lowly Herc boys took an interest !!