A rainbow is an optical and meteorological phenomenon. Water, light, and the angle you see the rainbow all play a factor.
First, rainbows are a reflection of light in water droplets in the Earth's atmosphere. That reflection causes a spectrum of light to appear in the sky which is the rainbow.
Because rainbows are a spectrum, you cannot physically approach one. So it technically doesn't form. It's not located at a specific distance because it depends on where you look at it.
One rainbow could look different to several people. If you're trying to find the best rainbow, here are a few tips:
The best ones happen when the sky is still dark and raining and you're looking in the direction of the sun. Also, you can typically find rainbows near waterfalls or fountains because of the mist.
So those are just a couple pointers if you're looking for them. But water, light, and your perspective all contribute to what a rainbow looks like and how it forms.