I believe the book "The Alchemist" is an allegory. Quite often in life people have dreams that they never try to fulfill. They talk about them, even plan them, but when an obstacle gets in their way, they let their dreams go. It is also human nature to make a journey but not to see the beauty in the trip.
In the story Santiago has a dream about a treasure. To fulfill his dream he has to make some drastic changes and take chances. He also has to learn to listen to his inner voice.
Santiago sells his sheep, works for different people, and gradually moves towards finding the treasure. His journey to find the treasure introduces him to new skills and new people. He even finds his love on the way.
Santiago never finds the tangible treasure but he learns that the things he had seen such as the pyramids, and done such as working for the merchant, and the people he had met such as his girlfriend have been rewarding.
An allegory is a like a parable of life that speaks about the moral value learn from the characters experience.