Odysseus is a very complex character, and during his travels and struggles he faces many different obstacles. Any one of the obstacles he overcomes could have stopped him from ever reaching home, but he chooses to ignore both comfort and pain, and be relentless in his goals; his self-discipline is such that he cannot be stopped in his quest.
For example, at the beginning of his tale, Odysseus escapes from both the Lotus-Eaters and the Cyclops, and his ships are blown away from home by a bag of magical wind. After encountering Circe, who turns his men into pigs, Odysseus agrees to remain with her for one year in return for their freedom; he is tempted to remain forever, but continues to set out for home.
Although his men cause their own deaths by hunting the cattle of Helios, Odysseus survives, and it is here that he is captured by the nymph Calypso, who holds him for seven years on her island. Although she loves him and provides him with everything he needs, Odysseus is determined to leave or escape. Instead of retiring to a life of comfort, he appeals to Calypso and to the gods, and is given his freedom. He sums up his general state of mind here, in Book V:
"...I want to get home, and can think of nothing else. If some god wrecks me when I am on the sea, I will bear it and make the best of it. I have had infinite trouble both by land and sea already, so let this go with the rest."
In facing alternatives to his quest -- death, discouragement, pleasure, and the simple acquiescence of just giving up -- Odysseus remains focused on his goals. He refuses to be swayed for long, and although he certainly takes his time, he makes it home to his faithful wife, Penelope.