Odysseus is the wandering hero in Homer's Odyssey. In so many ways, Odysseus is such a smart man, but sometimes he is just a little too smart (or smart-aleck) for his own good. His leave-taking from the Cyclops is one of those times.
Odysseus and some of his men find the cave of Polyphemus; when they discover that the Cyclops is away, his men try to convince Odysseus to take some cattle and cheese and leave before the giant returns. Odysseus' first act of foolishness is to ignore them; he insists on waiting for Polyphemus and getting a gift from this host (though Odysseus was certainly not a welcome or invited guest).
Once Polyphemus returns, Odysseus and his men are trapped, and Odysseus must be crafty and cunning to get himself and his men out of this predicament. Though he loses a few men in the process, Odysseus does manage to trick Polyphemus and escape. First he manages to get the giant man drunk enough to pass out; before he does, Polyphemus asks Odysseus his name.
The adventurer is quite cunning and gives the giant a wrong name:
‘Cyclops, you asked about my famous name.
I’ll tell you. Then you can offer me a gift,
as your guest. My name is Nobody.
My father and mother, all my other friends—
they call me Nobody.’
Now they have a giant man too drunk to remove the giant boulder from the cave, something they cannot do on their own; so they poke him in his only eye with a burning stick until he wakes in a rage and moves the boulder, hoping to catch the enemies he can no longer see. Of course Polyphemus is shouting, but when his fellow Cyclopes ask him who is bothering him, Polyphemus tells them "Nobody" is bothering him, so no one comes to help him.
Odysseus once again proves his skill in getting out of difficult situations as he and his men escape unnoticed by riding on the undersides of the Cyclops's giant sheep. Once Odysseus and his men are back on their ship and have begun to sail away, however, the great man makes another foolish error--or two.
First, he taunts Polyphemus, causing the giant to throw a great boulder at Odysseus's ship. The waves cause the ship to come closer to shore rather than farther away. This could have been a deadly error in judgment, but the ship manages to push off and get even farther away from shore. Now Odysseus makes his second foolish error when exiting the island, again failing to heed his men's advice. This time he not only taunts the Cyclops but he also tells the giant his real name.
[M]y warrior spirit did not listen.
So, anger in my heart, I yelled again:
"Cyclops, if any mortal human being
asks about the injury that blinded you,
tell them Odysseus destroyed your eye,
a sacker of cities, Laertes’ son,
a man from Ithaca."
What the smart Odysseus did not know is that Polyphemus is the son of Poseidon, a fact the giant now reveals--along with the fact that he intends to tell his father about Odysseus and what he did. After the Cyclops throws one more boulder at the ship (this one pushes them out to sea), the episode is over; however, the consequences of this bit of temper will be felt by Odysseus and his men for years. While his taunting may have helped assuage his anger at the giant, it came at a significant price, as you will see.