What causes a rainbow, its colours and its shape?
Short answer: A rainbow is formed when light enters a drop of water or an ice crystal and gets refracted and reflected back into an observer's eye.

Longer Answer: Light travels at different velocities depending on the media involved; it travels slower through water than it does through air, for instance. As light enters a raindrop or ice crystal, it first gets refracted. However, not all the frequencies of light get refracted at the same angle. The colors with the shorter wavelengths (e.g. blue, indigo, and violet) get refracted less than the longer wavelengths (red). This spreads the colors out just like passing through a prism. The light then gets reflected off of the back of the raindrop, gets refracted again as it passes out of the raindrop, and travels to the observer's eye.

The reason it is circular is because the light that got refracted and reflected back to the observer, does so at a specific range of angles, 40 to 42 degrees.

In order to see a rainbow, the sun (or other light source) must be directly behind the observer. A straight line is formed from the light source, the observers eyes, and the center of the rainbow. All rainbows are actually circles. We usually see it as an arc because the earth intercepts the circle. (BTW, because of this, no two people, even standing shoulder to shoulder, can see the same exact rainbow. Each rainbow is being created by different raindrops.) If you're ever in an airplane passing over a cloud with the sun above you (as opposed to near the horizon), you may see a complete rainbow. It's pretty awesome.  Here's an illustration: