Odysseus brought only a few of his men and his ship to cross to the land of the Cyclops to investigate.
They arrived and walked through a field, where one of the crew mates gives the idea of just taking all the sheep and cattle they can see and leaving.
Odysseus is too curious to just stop there. He and his few men press on and find the Cyclops and his cave. They enter the cave, but the Cyclops does not see them at first and continues on with his daily chores.
Then the Cyclops sees Odysseus and his few men. He asks where they came from and why they were in his cave. Odysseus makes up a story about how they were shipwrecked there, but still the Cyclops sets a large stone blocking their exit.
After the Cyclops made meals out of most of Odysseus' men, he knew he had to escape. After blinding the Cyclops with a hot log, and saying that he was "Nobhdy". Odysseus and his remaining men escaped on the bottom of the Cyclops' goats.
When they all got back to the ship, Odysseus wanted people to know who blinded the Cyclops and got away. He told the Cyclops his name and his homeland, a mistake he will later regret.