When Polyphemus asks Odysseus his name, Odysseus proclaims that his name is Nobody. It is part of the escape plan. When he blinds Polyphemus, Polyphemus screams for help and exclaims that Nobody blinded him. Polyphemus can't see to give chase, and his relatives believe nobody blinded Polyphemus. Therefore they do not pursue Odysseus either.
This episode takes place in book nine, where Odysseus reluctantly tells the Phaeacians about his plights at sea.
Odysseus and his men sail to an island inhabited by one-eyed giants. Odysseus, then, happens to find a cave with milk, cheese, and sheep. They linger there, believing that the inhabitants would be hospitable. When Polyphemus, the one who dwells in the cave, arrives, he feigns hospitality. A little while after, his true intentions come out, and he devours two men; the rest he imprisons to eat later.
Within this context, Odysseus has to be clever. He realizes that only Polyphemus is strong enough to move the rock, which is at the mouth of the cave. So, he devises a plan. First, he gets him drunk on wine. Second, he says his name is nobody. Third, he makes a long pole to blind Polyphemus.
When Polyphemus is drunk, Odysseus makes his move and pierces Polyphemus' eye. Polyphemus cries out to the other Cyclopes that "nobody is killing me." So, the other Cyclopes leave him alone. When Polyphemus moves the stone, Odysseus and his men escape.
Odysseus had to lie to escape. This is one of the themes of the whole epic. Odysseus is a many of many wiles.
"O Cyclops! Would you feast on my companions? Puny, am I, in a Caveman's hands? How do you like the beating that we gave you, you damned cannibal? Eater of guests under your roof! Zeus and the gods have paid you!"