Airplanes take longer to fly west than east because of high-altitude winds that blow from west to east. The Earth has four such wind patterns, and they are called jet streams. When planes fly from west to east, the jet stream helps accelerate the aircraft. When they fly in the opposite direction, the planes cannot fly as fast into the face of the wind.
Each of the Earth's hemispheres has a polar jet and a subtropical jet. Airplanes typically try to take advantage of these various jet streams to improve fuel efficiency and shorten flight times. Traveling from the east coast to the west coast of the United States takes 30 to 60 minutes longer than flying in the opposite direction. Transatlantic flights can vary by even more time, as the planes must fly much longer distances.
Jet streams form because of a combination of the differential heating of the Earth and the effects imparted on the wind due to the planet’s rotation. The planet has other stable wind patterns as well, called the trade winds, known as easterlies and westerlies. These winds blow in different directions, but they have a similar effect on planes traveling with or against them.