In the original story, Aladdin's first wish is to be saved from the cave where he finds the lamp. His second wish is often to become a prince so that he can marry the princess. And his third wish is usually to free the Genie from the lamp.
Aladdin finds the magic lamp in a cave. A magician tricks him into going into the cave to get the lamp for him. But once inside, Aladdin discovers the lamp and realizes its power.
The original story of Aladdin is from the collection of Middle Eastern folk tales known as One Thousand and One Nights. But it's not attributed to a single author.