The stability depends on the construction of the ring, and its mass. The mass is the trickier of the two so I'll start with it first. Gravity has a tendency to make massive things more spherical. On the other hand, if the mass is too light, newtons third law starts coming into play and it become increasing easy to disturb. This all brings us to the construction of the ring- because of how the ring is constructed, it is basically an engineering problem that uses the strength of the materials to counteract gravity's strain, while making it heavy enough so that it has enough inertia that shocks to the system cause little change.
Note here that there would be no gravity forces applied while you were inside the ring (due to the Shell Theorem), however most of these structures were originally conceived to use centrifugal action to hold people to the inner edge of the ring. This means one of two things; either it is spinning and he habitation zone is inside the ring (as your inertial would fling you off the planet if you were on the outside), or that it isn't and the habitation zone is on the outside.