They escaped by making a spear and stabbing the cyclops in the eye so he could no longer see. Also then when the cyclops moved the boulder to get out of his cave, he felt all the sheep to make sure the men weren't escaping. So they grabbed on to the bottom of the sheep so he didn't know they were escaping.
When you infer you are making an educated guess about something or a topic your reading. When it comes to reading you want to make a logical guess about what you think the story is about