This Northrop Grumman video (starting at
09:31) illustrates JWST's orbit in a non-rotating (normal) frame. It's really in an orbit around the Sun about 1% farther than Earth's, but the weak tug of Earth pulls it along a bit faster so that it remains in 1:1 resonance with the Earth. The orbit is called a "Halo orbit" because in a rotating frame it looks like it's a ring around the L2 point.
Regular, but very small station keeping propulsive maneuvers keep it in this otherwise unstable configurations. The more frequent the adjustments, the lower overall fuel consumption per year. According to this and James Webb Space Telescope Initial Mid-Course Correction Monte Carlo Implementation using Task Parallelism and Station Keeping Monte Carlo Simulation for the James Webb Space Telescope there will be a small propulsive station-keeping event every 21 days. Wikipedia says this will consume 2-4 m/s of delta-v per year from a budget of 150 m/s, so the lifetime could conceivably be much longer than 5-10 years, although I believe about half of that (~67 m/s) will be used in mid-course corrections on it's way out to the Halo orbit.
If/when station-keeping maneuvers were to stop, JWST will wander away from this resonance and go into a more (or less) chaotic orbit around the sun. It will not be unpredictable though. The understanding of the orbital mechanics is well developed, and if there is no refueling, the final orbit will be chosen and the final propulsive maneuvers will be carefully executed to put the JWST in it's chosen final path into Heliocentricity.
However, there is talk about making the JWST approachable for service missions, and this might make refueling possible. See for example Besides HST, JWST and stations, are there any examples of satellites designed for service in space?, refueling technology for spacecraft is also discussed in Is Landsat-7's propellant resupply port “robot-ready”? (Restore-L mission).
NASA's Propellant Transfer Technologies, Robotic Refueling Mission, and RRM Task : Refueling webpages have more photos and information.
Considering that the Hubble Space Telescope is still highly productive after 27 years, it's hard to imagine that there is no contingency for extending the JWST's lifetime beyond ten years, even though it many not be a formal part of it's current mission. Throwing away a billions-of-dollar science instrument simply for want of some propellant (or other consumables) is hard to imagine.
In JPL Horizons there is a sample calculation of a Halo orbit for JWST that was done in 2014. It orbits for about eleven years, and presumably includes small station-keeping maneuvers to do so. This real-world orbit is more complex than a pure CR3BP (Circular Restricted Three-body problem) halo orbit because the Earth is in an elliptical orbit around the Sun, and the Moon adds further perturbations.
The first figure below shows the complete, eleven-year orbit with it's final wander away from L2 when station keeping ends. This is a "top-down" view of the Ecliptic plane, with the Sun to the left.
The next three images are just one year's worth, showing the two loops of the six-month period halo orbit. The Blue dot is the Earth, the green torus is the Moon's orbit, and the red line is the orbit of JWST. The coordinates are in the rotating frame of the Earth-Moon barycenter around the Sun.
above left: Top-down view, eleven years. right: Top-down view, one year. (Sun to the left)
above left: View from the Sun, one year. right: View from the side, one year. (Sun to the left)