rainbows appears due to the refraction of light. Rainbows can be seen when we stand facing against the sun. The theory behind it is ,when white light passes through the water drops in the atmosphere ,they act like small prisms and hence refraction occurs spreading colour . since red has the longest wavelength its seen at the top as it travels longer distance ,while violet is seen at the bottom due to its shorter wavelength.
its impossible for us to stand under the rainbow as its a trick done by refraction ,similar to that when it causes a mirage . i hope this helps.