We used to do that with Linux. The X Window system (the most common GUI base in Linux) is based on a concept of virtualized displays. Which virtual display happens to be shown on a physical display is completely arbitrary. So you could create a dozen virtual desktops, and display them onto a dozen different monitors. And if you had a dozen mice and keyboards plugged in, a dozen different people could all use the same computer (the hard part ends up being keeping track of which keyboard and mouse goes with which display).
In fact one trick we'd do in the old days (single core processors) is to rig up two computers together. You would actually use your friend's computer, but your display would be controlled by X Window on your computer. And vice versa. The theory being that doing an operation on the computer imparted a processing load and a GUI load. By splitting up the tasks this way, one computer handled the processing load while the other computer handled the GUI load. And since each computer was able to use all its power on a single task, their response times were faster. You only experienced slowdowns when both you and your friend randomly did an operation at the exact same time. (Multi-core systems do this all the time now, by splitting up processing tasks between multiple CPU cores.)
Alas, Windows isn't designed to do this. In fact, it's explicitly designed to prevent you from doing this (unless you're running Windows Server). Microsoft wants you to pay a Windows license for every user of a Windows computer, not per computer. So if you login as one user, non-server versions of Windows will automatically log anyone else out. If you're using a Windows computer, and someone else remote desktops in to your computer logging in as a different user, you'll be automatically be logged out.
A game could bypass it by being able to run in two-player mode as a single user. Kinda like the old fighting games where you played on the left half of the keyboard while your friend played on the right half. The game could display two viewports in a single extra-wide window. Then you use Windows extend-a-desktop feature to split that window across two monitors, one viewport per monitor. Then the game could allow two game controllers to control the different viewpoints. But the game would have to be specifically coded to work this way. That wouldn't really be *that* much work - the split screen console games already do this, though on a single monitor. But it would have to be done by the programmers to add it as a feature of the game; it's not something the end user can put together.