I've actually done this on a single flight.
Travelling on Delta Los Angeles-Atlanta-Boston, on a through flight. We could stay on board at Atlanta if desired, but schedule stop time about 70 minutes. I had never seen the Marta rapid transit system, which goes to the airport, so bounded out at ATL, took the transit to the main terminal, into the rapid transit train, rode one station, transferred and rode back, took some photos, back through security and down to the gate.