Prior to Odysseus's cunning plan to sneak his men out of Polyphemus's cave by tying them underneath sheep so that the Cyclops cannot feel them, he first needs to blind the Cyclops so that the monster will not be able to see them. Odysseus knows that if he simply kills Polyphemus, he and his men will never be able to move the stone away from the door to the cave and that they will all perish in the cave together. Thus, he knows he must injure the Cyclops in a way that will make it more difficult for the monster to catch them but so he can still move the stone.
When Odysseus left his ship, he'd brought with him a skin of very potent wine given to him by Maron, a priest of Apollo, in Ismarus. He essentially gets Polyphemus drunk on this wine, waits until the monster passes out, and then blinds the Cyclops with a stake he and his men have sharpened and hardened in the fire. Now, the monster will not be able to spot Odysseus and his crew as they are tied under the sheep, and he will only think to feel for the men on top of the sheep (because he's not as cunning as Odysseus is).