The men were trapped in the cave with the Cyclops, therefore if they didn't get out they would all die. "In one stride he clutched at my companions and caught two in his hands like squirming puppies to beat their brains out." For this reason, if they did not escape more than two of Odysseus' men would be killed. Even though Odysseus did not like all of the men, he still wanted them to return home.
Odysseus had to fight against his men because they did not want him to tempt the cyclops, but he did anyway. "Cheered my men along with battle talk to keep their courage up: no quitting now." Basically Odysseus' men didn't want to hurt the cyclops, for they just wanted to sneak out. Odysseus instead wanted to stab the cyclops in the eye to kill him.
As the Cyclops stormed out of the cage chasing after his escapees, he threw a boulder at the water- hoping to hit their ship. The other men told Odysseus on the boat not to shout taunts at the giant but the other got cocky and continued on mocking the sightless beast.