What do rings in Pokemon Go battles mean?

How do I use the rings in Pokemon Go battles? What do they mean and what is their purpose?
Those determine how easy to catch is the Pokemon. Green means easy, orange means a little hard, and red is hard. The smaller you can get the circle, the better the catch chance is.

Original thread: https://forums.imore.com/threads/what-do-rings-in-pokemon-go-battles-mean.368389/