Atlas was a Titan, one of the firstborn sons of Earth. Atlas made the mistake of siding with his brother Cronus in a war against Zeus. In punishment, he was compelled to support the weight of the heavens by means of a pillar on his shoulders.He was temporarily relieved of this burden by Heracles, who needed the Titan's aid in procuring the Golden Apples of the Hesperides. In connection with another heroic quest, Atlas divulged the whereabouts of the Graeae to Perseus.
The encounter of Atlas and Heracles came about when Eurystheus, the great hero's cousin and taskmaster, challenged him to retrieve the Golden Apples of the Hesperides. The Hesperides, or Daughters of Evening, were nymphs assigned by the goddess Hera to guard certain apples which she had received as a wedding present. These were kept in a grove surrounded by a high wall and guarded by a dragon named Ladon, whose many heads spoke simultaneously in a babel of tongues. The grove was located in some far western land in the mountains named for Atlas.
Heracles had been told that he would never get the apples without the aid of Atlas. The Titan was only too happy to oblige, since it meant being relieved of his burden. He told the hero to hold the pillar while he went into the garden of the Hesperides to retrieve the fruit. But first, Heracles would have to do something about the noisily vigilant dragon, Ladon.
This was swiftly accomplished by means of an arrow over the garden wall. Then Heracles took the pillar while Atlas went to get the apples. He was successful and returned quickly enough, but in the meantime he had realized how pleasant it was not to have to strain for eternity keeping heaven and earth apart. So he told Heracles that he'd have to fill in for him for an indeterminate length of time. And the hero feigned agreement to this proposal. But he said that he needed a cushion for his shoulder, and he wondered if Atlas would mind taking back the pillar just long enough for him to fetch one. The Titan graciously obliged, and Heracles strolled off, omitting to return.