If You Need a Server OS
It is possible to fully uninstall the GUI from the Terminal, but please be aware the elementary OS is not a server-targeted OS. If you need a server OS, I recommend Ubuntu Server. You'll get the same Debian/Ubuntu underpinnings tailored to a server environment. This is much better than trying to work backwards from a desktop-focused OS.
If You Need a TTY Temporarily
If you just need to access a full-screen Terminal without any GUI, you can switch to another TTY with the keyboard shortcut ctrl+alt/option+Fn where n
is a number 1-6.
If You Really Are Sure You Want to Uninstall The GUI (Don't Do This)
Please be sure you really really really want to do this. This is probably a bad idea. It might be hard to recover. If you're 100% sure, open up a Terminal and enter the following:
sudo apt-get remove xserver-xorg
That should uninstall the X server (the thing that lets us display graphics). Please don't do this unless you are 100% sure this is what you want.