This is an election map filled with two parties: blue and green.
We have 8 blues and 12 greens.
In a straight up popular vote, green wins easily—no controversy so far. Many would even argue that this is the only "Fair" way to hold an election: by simple majority. However, for one reason or another, we might want to split this electoral map into "districts." Maybe you're voting for local representatives in a legislature. Maybe your country has a strange fetish for states instead of citizens. Maybe you're trying to rig an election. I don't know.
Regardless, the person who gets to draw the district boundaries has tremendous power over the election results:
Green wins 3-2. Here, the district boundaries are drawn vertically, so that the ratio of blue districts to green districts is the same as the ratio of blue voters to green voters. This map is "fair."
Packing and Cracking
But what if I wanted to be unfair? how would I go about it?
The name of the game is wasting as many of your opponents' votes as possible. A 3-2 win for Green is just the same as a 5-0 blowout. Furthermore, when you win 3-2, your opponent's 2 votes aren't helping him at all—hence "wasted" votes. It follows that you should split your opponent's votes, and pair them with just enough of your voters so that their's are ineffectual.
Notice how green wins every district 3-2, and that Blue's votes, despite their number, aren't coordinated enough to win a single district. This is called "Cracking."
But what If you don't have enough votes to crack properly? If you try just this tactic in favor of blue, you'll quickly realize that blue doesn't have enough votes to make it work.
The solution is to allow your opponent to win some districts in a landslide. Every vote over the required majority is "wasted," allowing you to get back to cracking.
Green's districts on the right have been "packed:" wasting votes so we can crack the remaining green votes in the center column.