Contrails are caused by water in the exhaust of jet engines and then freezing in the upper atmosphere.  It's basically the same thing as a cirrus cloud.  High performance airplanes can make white trails off their wingtips or on top of their wings which is caused by low pressure which in turn reduces the amount of water that is naturally in the air that the air can hold and it forms a cloud.  An interesting side note is that long contrails = high relative humidity, short contrails = low realitve humidity.
why sometimes a white foggy line or trail made behind the airplane in the sky.?