Gates (with jetways and all that) are extremely precious. They are only used by passenger aircraft, and even then to load or unload passengers. My last flight had a nice tailwind and arrived early; we had to wait 20 minutes for a gate to open up.
During any other times, aircraft are sent to a ramp area, or a chunk of airport area reserved for parking and servicing airplanes.
London Heathrow is a very cramped airport with an abnormally tiny ramp area, however here is much of it.
Note the special guest near bottom, just right of center.
Notice a couple of areas walled off for engine run-up testing. Southwest of here there's additional ramp in the space reserved for Terminal 5D. All in all, Heathrow is very sparse on ramp area; even SFO has more. (SFO also still has the literal ramps for seaplane operations.)
Now, busy airports have lots of taxiways that less-busy airports do not need, like taxiway A and B at Heathrow, which provide basically 2-way traffic. If an incident causes reduced activity that makes some of those taxiways redundant, they can park planes on them. Further, if certain runways are expected to be crosswind runways for the duration of a crisis, they can stack those up too. At extremes, Kingman Airport basically took their east-west runway out of service and is using it to store decommissioned RJ's. They used to store more aircraft still. This could also be done temporarily with a crosswind or little-used runway.
Also, even if an airplane is grounded, a ferry move may be permitted out of a very cramped airport like Midway to an airport with more ramp space available. Look at this sat photo of the ramp at Victorville (former George AFB). See something familiar?
The date is Aug. 25, 2018, and these planes are about 110' long, making these most likely 737-300's (or -700s?). Bet Southwest wishes they had them back right now! The one at far right is about 129' long, making it a -800 or MAX 8.