As a kid, it was my favourite time to watch a rainbow come up and wait until it disappears.Rainbows are caused by the fact that light has it's path bent when passing through water droplets. Sunlight is a mixture of light in all the visible colors. These different colors of light bend by slightly different amounts when passing through the droplet. This breaks the Sunlight up into it constituent color. This causes you to see all these colors separately as a rainbow.
But I never understood how they were made.
And if there is really a treasure at the bottom...
Seeing a rainbow relies on the angle of where the sunlight in coming from and the angle between your eye and the droplets forming. Because of this rainbows always appear to keep a constant distance from you. If you walk towards it it retreats from you.
So, you can never reach either end of a rainbow to get to the promised treasure. The phrase, " The pot of Gold at the end of the rainbow" is more meant to express the idea of an unobtainable goal or reward. Something you can never get.