Well, those are the Obedience Rings. Each dog competes against a set of points for each exercise. If a dog can do this, he has earned a qualifying leg. After three legs, the dog can move to the next level of competition. Hopefully this has clarified what goes on at dog shows for you.
Dog shows seem insane, but it is an organized chaos.
Next time you visit a show, see if you can figure out what is going on in each ring.