What appears on a map or flat surface as a straight line is not the shortest distance between two points. This is because the earth is not flat, but is a sphere. Thus the shortest distance between two points on a sphere is an arc rather than a straight and constant heading. This arc is called the great circle route.
Interestingly, to actually fly the shortest distance, a pilot must slightly alter his heading continuously, to stay on the course of the great circle.
So if the above globe were flattened out on a 2-dimensional screen or table, the straight red line (and shortest distance) would appear as a curve, rather than a straight lineโฆ and the curved and longer, dashed blue line (and constant heading) would appear straight on a screen.