It's something that takes tons and tons of practice. The more positions and tactics and openings you burn into your long term memory the less you need to keep in short term memory.
The best players in the world have put so many thousands of hours into the game that they can beat casual players trivially without thinking more than one move ahead. They owe this ability to having vast knowledge of fundamentals and theoretical lines in all the most common positions. This is how they are able to win simultaneous exhibitions against a large number of casual players.
it's not always about thinking many moves ahead with chess - often it's a case of looking for interesting patterns on the board that you can turn into an advantageous situation. Did the other player king-side castle? Look for ways to pick away at their pawns. King and queen/rook within 2 knight moves of each other? Could be an opportunity for a fork. You pick up more of these patterns over time, and you can start to scan for chains of these types of attack/defense.
The best players in the world have put so many thousands of hours into the game that they can beat casual players trivially without thinking more than one move ahead. They owe this ability to having vast knowledge of fundamentals and theoretical lines in all the most common positions. This is how they are able to win simultaneous exhibitions against a large number of casual players.