A rainbow isn't a thing in one place — it's light from millions of raindrops, each bending sunlight and bouncing it back toward you. Inside every drop, white sunlight refracts, splits into colours (dispersion), reflects off the far wall, and exits at about 42° from where it came in. Scroll through the three scenes below to see exactly how the arc appears.
A ray of white sunlight enters the drop and bends (refraction). Because each colour bends by a slightly different amount, the white splits into a spectrum — dispersion. The light reflects off the back inner surface, then refracts again on the way out, leaving at roughly 42°. Red exits a touch wider (~42°) than violet (~40°). Drag to move where the ray strikes the drop.
The Sun is behind you. Every drop that sits 42° away from the antisolar point (the shadow of your head, directly opposite the Sun) sends red light to your eye; drops at ~40° send violet. All those directions trace a circle, so the bow is an arc with red on the outside and violet on the inside. The horizon cuts off the bottom — that's why you usually see a semicircle.
Some light bounces twice inside the drops before leaving. That second reflection sends light out at about 51° instead of 42°, forming a fainter secondary bow outside the first — with its colours reversed (red inner, violet outer). Toggle it on, then sweep a ray through a drop to watch the two paths diverge.