Okay, so you want to fly between two locations. When driving, where you can use Google Maps or MapQuest or whatever and pick out a set of roads, and then you can go drive them! It's pretty straightforward, although sometimes (often!) the way you get from one point to another isn't always straight, on account of cities, water, mountains, etc.
Flying, however, is pretty easy. If I want to fly to Livermore, which is roughly east-north-east of where I'm at now, I can just point my airplane in that direction and go.
Right? Yes! For sure!
It turns out that flying from point A to point B -- even ignoring things such as airspace! -- is quite complicated. Let's say, hypothetically, that I know Livermore is on a true course of 80 degrees from where I'm at. It's slightly north of east, that's great.
If you were to just point your airplane to 80 degrees, you'd actually miss Livermore. Possibly by quite a bit. There are several reasons for that, and we'll have to work through them one by one if you actually want to fly from here to Livermore. The first thing we have to correct for is the wind. Like it or not, airplanes inhabit this great big body of air that tends to move around, and you don't have much choice in the matter.
Complicating this is our altitude. Winds change a lot at altitude, so you have to be conscientious of that and get your "winds aloft" forecast for your trip. In our case, let's say the wind is from the north at 30 knots at the altitude you've chosen.
You plug this into your handy-dandy flight computer (a type of slide rule!) and you determine that to fly a true course of 80 degrees like we want, with a 30 knot wind from the north, we have to account for -17 degrees of shift due to the wind. This gives us a true heading of 63 degrees.
Almost there... but there's one more major thing to think about.
Maps are cool, awesome, and they are drawn according to true lines of longitude and latitude. North on a map is the one true north, which gives us maps that are globally accurate. Unfortunately, the thing about airplanes is that they use compasses to point themselves. Compasses have this one critical weakness: they rely on magnetic north, which is quite a bit different. (Canada apparently has it.)
To convert from the true heading above, you need to find and apply magnetic variation. Where I live, it happens to be approximately 14 degrees East, which means you subtract it from the true heading to get a magnetic heading of (63-14) = 49 degrees.
Now you are absolutely going to hit Livermore! Right?
Sorry, there's one more step I forgot to mention. Airplanes are giant hunks of metal with electronics, rapidly whirling combustion engines, and all sorts of gizmos. They're pretty rad, but one of the side effects about all that gear is that they have their own magnetic fields -- which affects the compass. This is called magnetic deviation, and every airplane is different, so each one has one of these:
In this particular example, it turns out that 49 degrees probably doesn't need to change on account of the deviation from local magnetic fields, but in some airplanes it might be a big number. That said, even a small number of 1 or 2 degrees can actually add up to quite a bit when you start talking about flying 500 miles in some direction. It's important and adds up.
And now, almost certainly and positively truly FOR REAL we are ready to fly to Livermore by pointing our airplane so that the compass heading is 49 degrees, and we'll get there. I couldn't be happier!
Unless the wind changes, of course.
Now, imagine if you had just pointed your airplane to a compass heading of 80 degrees and said "good enough". The final result is 31 degrees less than that, and after not very much time at all you'd be quite far from where you intended to be, ending up far south of Livermore!
Flying is fun, I love it. :)