OK, I'm going to have to be careful with this one as it would be easy to get bogged down in the minutiae of pickup polarities and phasing issues and, before anybody knew it, I'd have written a book to rival Britannica. At a very, very high level, then, a humbucking pickup consists of two coils of wire (wrapped on plastic bobbins), a bar magnet and some 'pole-pieces'. For the purposes of this discussion we can just concentrate on the two coils of wire and the magnet.
These two coils sit side by side (as you see in the photo). The magnet is a length of bar that sits underneath, basically in the middle. The bar-magnet has one side (not end) as a north pole and the other as a south pole. In this way, each of the wire coils is effectively magnetised with opposite polarites.
When these opposite-polarity coils are connected so they are electrically out-of-phase, (effectively one coil winds clockwise and the other anti-clockwise), the result is that much of the nasty interference that can be picked up is cancelled out while the actual string's vibration isn't. It's a hum-cancelling (or bucking) pickup. Brilliant. Hurrah for Seth Lover and, the cruelly forgotten, Ray Butts.
Why am I telling you all of this? Mainly to seem impressive and knowledgable. I may grow my beard out, stroking it all the time, until it's bushy and scholarly. Also, I'm telling you so the rest of this makes a bit of sense.
When two pickups are used in the same guitar, magnetic polarity and their coil-wrap directions can interact to cause different effects. There are other variables too but that's a topic for another long, rambling post.
Generally, there's an 'accepted' way to install pickups (but rules are made to be broken—experiment and maybe you'll find a Peter Green sound or similar) and, mostly, you don't need to worry about the polarity of each coil on your humbucker.
But sometimes you do. It's difficult to give you a list of the times this is necessary but, for example, some guitars (some PRS and Ibanez models spring to mind) implement switching options that offer various coil-tap options and this can help keep mix positions hum-cancelling. To accommodate these options, sometimes one of the pickups has its magnetic polarity 'flipped'. If you're dropping in some new pickups to these guitars, it can sometimes be necessary to consider magnetic polarity to prevent things sounding weird or unpleasant.
Then, we flip the magnet ourselves. Here's how to do it if you need to*.
Unwinding the wrapping around the coils reveals the hook-up wires. If you touch these, the world will end in a massive fireball of guitary doom. Don't poke them. Leave them alone.
On the bottom of the pickup, the baseplate will have some screws holding the bobbins to it. Loosen these but just a little—you don't want to bobbins to fall off.
Now, carefully, give the bar magnet a shove (away from the hook-up wires if they're in the way). It will emerge like the photo on the right. When it's out, don't look away—flip it before you loose track (it can be a good idea to mark it with a fine permanent marker so you don't go astray if you like).
When flipping, remember it's NOT end to end. It flips in the 'short' direction. See the arrow in the photo? Flip it that way, 180º (one half rotation).
Reassemble and proceed with your wiring, content in the knowledge that your pickup's magnetic polarity has been flipped. What was the north coil is now south and vice versa.
Now start growing your beard.
*A word of caution here. If you decide to try this yourself, be massively careful. Pickup coil wire is incredibly thin and delicate and will break if you look at it for too long. It's that delicate. Also, if the whole pickup falls apart into many different pieces, it won't be fun to put back together. This is an At Your Own Risk sort of job.