I was only 5 or 6 maybe when I used Windows 3.1 so I may be misremembering, but didn’t it have an X on the desktop to close the GUI and return to the DOS prompt?
Windows 3.1 didn't have any "X" buttons. It had the system menu (the one shaped like a spacebar, since the hotkey was Alt-Space). If you quit Program Manager, it would end the Windows session (since Program Manager was your shell). If you had a replacement shell (as some did back then, Norton Desktop etc), then quitting that would exit Windows and return to a pure DOS prompt.
There was a way to “drop to DOS” alright, which is what you would have had to do for games and the like. Can’t remember the exact mechanism but it could have been the x on the “program manager” window.
The raise Windows you’d type “win” and if you wanted to “boot to windows” you would call “win” from your autoexec.bat