While Earth itself is spinning about 1,180 km/h to the east, the ground and everything on it are travelling even faster – at about 1,670 km/h (1,037 mph). Even the air above the ground is travelling at around this speed in an easterly direction. So for an aeroplane to get anywhere at all, it has to be moving relative to the ground.
Say it’s travelling at 160 km/h (100 mph) – because it’s already moving at 1,670 km/h with the planet, plus that little bit extra, it’s able to keep itself ahead and actually get somewhere. On the other hand, if it’s travelling towards the west, it’s actually moving 1,670 km/h MINUS 160 km/h