It depends on the program.
For example, emacs will open a window if the X server is available. Typing "emacs" at the console will open the window.
Other programs, like nmap, have a completely separate program for the GUI. Specifically, nmapfe is the GUI interface for nmap. You have to run "nmapfe" from the console to get the GUI.
It varies for each program.