Depends:
If you work remotely, using VS Code Liveshare or IntelliJ CodeTogether (depending on tooling) works a charm.
In office environments, I once worked in a place where each workstation had two sets of mice and keyboards connected.
Main thing about pairing is communication: one person "drives", while both people talk through what they are doing/thinking. The non-typing partner can be a "map reader" of sorts, thinking ahead. It really will be different from person to person.
The benefit of remote setups with two people working the same code in their own editor is one person can run ahead and write the tests, while the other writes the implementation code (and both communicate what they're doing).
What either setup has had in my experience is constant communication between the parties.
Main thing about pairing is communication: one person "drives", while both people talk through what they are doing/thinking. The non-typing partner can be a "map reader" of sorts, thinking ahead. It really will be different from person to person.
The benefit of remote setups with two people working the same code in their own editor is one person can run ahead and write the tests, while the other writes the implementation code (and both communicate what they're doing).
What either setup has had in my experience is constant communication between the parties.
This is a decent article as well: https://gds.blog.gov.uk/2018/02/06/how-to-pair-program-effec...