How are GUIs like this made, but in console applications?
There are many examples, such as alsamixer:

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Libraries such as Curses do it much the same way that window managers run graphical environments. Controls such as windows, buttons, checkboxes are all defined by the library.
Instead of WriteLining to the screen, you’re writing text to a window or setting the text of some control. The library keeps track of windows, overlap, border effects, drop shadows, drag behavior (if the mouse is supported). It builds up a character buffer of characters, foreground, and background colors.
The goto(x, y) example posted would work, but if the implementation did this for each character, the performance would lag noticeably. To get the quickness, when you make a change to some text or other properties, the library knows the rectangular regions that need to be updated from the character buffer and writes the new character data for that region to the screen in one chunk with optimized calls to the video drivers.
Unlike with basic console apps which just echo every printable character to the screen, keyboard input in these advanced apps is intercepted and such characters are more explicitly written to (or not written to, in the case of your app’s hotkeys) the right window or whatever.
I wish .Net had a whole Console windowing library built in. … [Sigh] I think those old console-style apps look pretty sweet.