Atlas was one of the old gods of Greece who were called Titans. After Zeus defeated the Titans in a war, he punished them severely. Atlas, for his punishment, had to stand in the the Garden of the Hesperides on the western edge of the world and hold up the sky on his shoulders.
One day, the hero Heracles came to the Garden in order to collect the golden apples that grew there. The apples were guarded by a dragon, however, and only Atlas could safely retrieve them. Atlas agreed to help Heracles, but his real plan was to trick Heracles into taking his place.
"If you want me to get the apples," Atlas said, "you will have to hold up the sky for me. I will bring you the apples, and then you can put the sky back on my shoulders."
Heracles agreed to hold up the sky while Atlas fetched the apples. Atlas eventually returned with the apples, but only in order to taunt Heracles. "Here are the apples," Atlas said, "but I've decided to let you keep the sky."
"Well, I am certainly strong to hold up the sky for all eternity," Heracles replied, "but I'm worried that the sky is not placed evenly on my shoulders. I need to place my cloak across my shoulders to keep the sky from slipping. It will only take me a moment, if you don't mind."
Atlas agreed to shoulder the burden just for a moment, not suspecting a trick. As soon as the celestial sphere was resting again on Atlas' shoulders, however, Heracles grabbed the apples and made his escape. "Thank you, Atlas," he shouted. "I am very grateful for your help!"
As a result, Atlas is still standing at the western edge of the world, holding the celestial sphere on his shoulders.