How will Ant-Man escape the Quantum Realm in Avengers: Endgame? The post-credits scene of Ant-Man & the Wasp saw Scott Lang stranded in the Quantum Realm. Thanos had succeeded in his insane goal of erasing half of all life in the universe with a snap of his fingers. And Scott's closest friends - the only ones who knew he was even exploring the Quantum Realm, and the ones who were about to extract him - crumbled to dust.
It's long been clear that Ant-Man would return in Avengers: Endgame. For one thing, Marvel's been clear that there's a narrative throughline between Avengers: Infinity War, Ant-Man & the Wasp, Captain Marvel, and - ultimately - Avengers: Endgame. Given that's the case, just the fact they'd chosen to leave Scott Lang alive inside the Quantum Realm suggested he was going to be important somehow. That was confirmed when official Avengers 4 artwork showed Ant-Man working alongside the rest of Earth's surviving heroes, presumably working to either avert or undo the snap (officially known as The Decimation). More recently, the first trailer for Avengers: Endgame came to a close with a tantalizing scene in which Scott had escaped, and was attempting to get to the Avengers. Scott's escape is tremendously impressive, especially when you remember that Janet Van Dyne was stranded in the Quantum Realm for 30 years before being rescued from it.
So just how did Scott Lang escape the Quantum Realm, when Janet Van Dyne could not? So far, there are two possible clues. The first is that, when Scott entered the Quantum Realm in the post-credits scene, Janet gave him an important piece of advice; "Don't get sucked into a time vortex," she told him. "We won't be able to save you." In science fiction, a "time vortex" is usually an elaboration of Einstein's theories, and is often used to travel through time and space. A scientist like Janet would know better than to jump into a time vortex in order to escape the Quantum Realm; she'd be well aware that she could wind up anywhere, or any-when, potentially on any plane of existence. But Scott Lang isn't quite so smart, he's a lot clumsier, and he's willing to take crazy chances. He could conceivably either stumble into a time vortex, or actually choose to dive into one. It's worth remembering that Scott is wearing the Ant-Man suit, which means that if he winds up in the wrong place in time or space, he could simply shut down the regulators and shrink back down until he enters the Quantum Realm to try again with another time vortex.
There's a second important clue, though; in the Avengers: Endgame trailer, he drives up to the Avengers compound in a very distinctive van. It's Hank Pym's, and it contains a portable Quantum Tunnel. Now, it's true that the post-credits scene of Ant-Man & the Wasp strongly implied that the Quantum Tunnel could only be operated from the outside, but it's not difficult to imagine the possibility that Pym had built a failsafe of some kind, in case something went catastrophically wrong. So it's quite possible that van could still be Ant-Man's way out of the Quantum Realm.
At this stage, there's little concrete evidence to support either possibility. At the same time, though, the former is the most interesting in that there's an abundance of evidence supporting the notion that Avengers: Endgame involves time travel. That method would explain how Scott Lang was able to escape; if there's a time-jump at some point, it would allow the Avengers to learn that time travel was possible, and the van could then become the means to get into the Quantum Realm and enter the past. It's currently the more attractive of the two theories, in that it fits with the little that's known about Avengers: Endgame.