Sources: Wikipedia and

Contrails (a portmanteau of "condensation" and "trail") or vapor trails are line-shaped clouds produced by aircraft engine exhaust or changes in air pressure, typically at aircraft cruising altitudes several miles above the Earth's surface. They are composed primarily of water, in the form of ice crystals. The combination of water vapor in aircraft engine exhaust and the low ambient temperatures at high altitudes causes the trails' formation. Impurities in the engine exhaust from the fuel, including sulfur compounds (0.05% by weight in jet fuel) provide some of the particles that serve as nucleation sites for water droplet growth in the exhaust. If water droplets form, they can freeze to form ice particles that compose a contrail. Their formation can also be triggered by changes in air pressure in wingtip vortices, or in the air over the entire wing surface. Contrails, and other clouds caused directly by human activity, are called homogenitus.

Depending on the temperature and humidity at the altitude where the contrails form, they may be visible for only a few seconds or minutes, or may persist for hours and spread to be several miles wide, eventually resembling natural cirrus or altocumulus clouds. Persistent contrails are of particular interest to scientists because they increase the cloudiness of the atmosphere. The resulting cloud forms are formally described as homomutatus, and may resemble cirrus, cirrocumulus, or cirrostratus, and are sometimes called cirrus aviaticus.

All jet engines can potentially produce contrails, but specific atmospheric conditions are required for contrail formation, per the National Weather Service. The air needs to be both cool and humid — conditions that are most commonly found at cruising altitude. Lower humidity leads to short-lived contrails, while higher humidity leads to persistent contrails. Contrails most commonly form at an airplane's cruising altitude, between about 32,000 and 42,000 feet (10,000 to 13,000 meters) in the upper troposphere, per the Rocky Mountain Institute, because that's where those conditions are found. Because the atmosphere is ever-changing, conditions might not be right for contrail formation at this altitude, which is why not all airplanes create contrails during every flight.

Some persistent spreading contrails contribute to climate change and play a role in Earth's temperature regulation via the greenhouse effect. Per the National Aeronautics and Space Administration, clouds - including contrails - can have both cooling and warming effects on our planet. The sun emits thermal radiation that travels toward Earth. When solar radiation reaches thick clouds in Earth's atmosphere, those clouds can reflect the radiation out into space, keeping the planet cool. But when the radiation does reach Earth's surface, the planet itself reflects solar radiation out into space at night - unless there are thin clouds like contrails in the night sky. Those clouds can trap the reflected solar radiation and warm the Earth.