You might remember this as a lyric from the '80s Police song, "Wrapped Around Your Finger." It means being caught between a rock and a hard place, or two equally unattractive options.
In Greek mythology, the hero Odysseus was sailing home from the Trojan War through the Strait of Messina (which separates Italy from Sicily) where he was beset by two monsters on either side. Scylla was a giant with six heads, each having three rows of shark-like teeth, who devoured whatever came her way. (It was a personification of a reef.) Charybdis was a whirlpool on the opposite shore that sucked in ships that sailed near her. Avoiding one conflict meant coming too close to the other [source: Encyclopaedia Brittanica].
Odysseus had to figure out which was the lesser of the two evils as he had to pass through this strait to reach home. He chose to sail closer to Scylla since he risked losing only a few men as opposed to losing the whole ship if he went closer to Charybdis.