Rainbows are formed when sunlight passes through water droplets in the sky, and the light gets "split up" into the different colors because the different wavelengths of light travel through the water droplet slightly differently. In order for you to observe this, there needs to be a specific angle between you, the water droplet, and the sun.
The reason why rainbows are always curved like a circle is because that curve represents a set of points that all form the same angle between you, the water droplet and the sun. This is also the reason rainbows always seem at a distance, and you can never really get closer to it. When you move, the rainbow also "moves", meaning you are actually observing the colors from a different set of water droplets.