One of the lessons he learns is the dangers of arrogance and pride. Odysseus is quite full of himself for having tricked the Cyclops Polyphemus. He devised a cunning plan which involved getting the big, old giant blind drunk before thrusting a sharpened stake into his single eye, thus allowing Odysseus and his men to escape from the Cyclops's lair. With poor old Polyphemus flailing around in screaming agony, Odysseus and his men make their escape by clinging to the bellies of Polyphemus's flock of sheep.
And that really should be that. But Odysseus is so pumped-up full of pride, so supremely enamored of his own cleverness and cunning that he can't resist taunting the stricken Cyclops as his ship leaves the island. By revealing his identity and boasting about his exploits, Odysseus is making a big mistake; Polyphemus is the son of the sea-god Poseidon, and he pleads with his father to wreak terrible vengeance on Odysseus and his crew. Poseidon gladly complies with his son's request, and Odysseus is left as the last man standing. (Or swimming, as it turns out).