The origin of planetary rings is not precisely known, but they are thought to be unstable and dissipate over the course of tens or hundreds of millions of years. As a result, modern ring systems must be of modern origin, possibly formed of debris from a moon that suffered a large impact or was disrupted by the parent planet's gravity when it passed within the Roche limit.
The composition of ring particles varies; they can be either silicate or icy dust. Larger rocks and boulders can also be present.
Sometimes rings will have "shepherd" moons, small moons that orbit near the outer edges of rings or within gaps in the rings. The gravity of shepherd moons serves to maintain a sharply defined edge to the ring; material that drifts closer to the shepherd moon's orbit is either deflected back into the body of the ring, ejected from the system, or accreted onto the moon itself.
Several of Jupiter's small innermost moons, namely Metis and Adrastea, are within Jupiter's ring system and are also within Jupiter's Roche limit. It is possible that these rings are composed of material that is being pulled off of these two bodies by Jupiter's tidal forces, possibly facilitated by impacts of ring material on their surfaces. A moon inside the Roche limit is held together only by its mechanical strength rather than by its gravity, and so loose material on their surfaces would simply "fall off" to join the rings.
Neptune's rings are very unusual in that they first appeared to be composed of incomplete arcs in Earth-based observations, but but Voyager 2's images showed them to be complete rings with bright clumps. It is thought that the gravitational influence of the shepherd moon Galatea and possibly other as-yet undiscovered shepherd moons are responsible for this clumpiness.