Contrails: why planes leave white trails
Contrails, short for condensation trails, are the white lines aircraft leave across the sky. NOAA's description is about as plain as it gets: they form when water vapour from an aircraft's exhaust condenses and freezes into ice crystals.

That's the whole mechanism. NOAA's satellite service puts it as contrails form when water vapor from an airplane's exhaust condenses and freezes, forming clouds made of ice crystals. Your breath on a cold morning does the same thing on a smaller scale.
The FAA's account adds the conditions. Contrails are common in the upper levels of the troposphere and in the stratosphere, formed by aircraft flying in clear, cold, humid air when exhaust water vapour saturates or supersaturates the surrounding air. It also notes a second route: they can form aerodynamically, from the pressure drop around wings, nacelles and propeller tips cooling the air to saturation. That's the one you see streaming off a wingtip on a damp day rather than trailing behind the engines.
Why one aircraft leaves a long trail and the next leaves none
Humidity, mostly. NOAA's contrail model lets you change the air and watch what happens, and names relative humidity as the variable that affects the rate of dissipation of the contrail, in other words how long it takes to disappear. Two aircraft crossing the same patch of sky minutes apart can behave differently if the air between them has changed.
Trails belong to the altitudes described in how high planes fly, and a sky full of them is one of the easier things to photograph well, as plane spotting and the rest of the sky get into.
