When I run the command startx it launches me immediately into Gnome without having to login and if I attempt to go back to the command line interface by typing in the comamnd init 3 in the x-terminal it does nothing.
If I attempt to hit CTRL-ALT-Backspace it does nothing however if I were to run init 5 it launches me into the Gnome Display Manager and expects me to login and if I run init 3 in the x-terminal it shutdowns the x-server and returns me to the command line interface.
23 Answers
Theoretically you're doing the right-ish thing. In theory being in runlevel N means that all of the services associated with number N are running, and those that are not are not running.
In practice you can't make that transition without telling the system explicitly to make the transition for you.
You did confuse running startx with what typically happens in runlevel 5 though. When you enter runlevel 5, the system starts a display manager login (gdm, kdm, etc.). This is a simple display manager that will then start X as you once you log in (similar to what you did with startx... the differences are pretty small).
If you started gdm as root from runlevel 3, it is conceivable that some implementation of runlevel transitioning / management would stop gdm if you then indicated that you wanted to be in runlevel 3. I wouldn't count on it working that way in real life. First, the system might ignore you because no-one told it that it was in runlevel 5 even though gdm is running. Second, the system might not deal with the process you started in the same way it would deal with a process that was started automatically.
2init 5 is a runlevel. A runlevel basically initializes the system by starting software. Runlevel 5 is usually used to start in graphical mode.
If you start in a non-graphical mode, or you open a tty (in general Ctrl-F1 through Ctrl-F6) startx can start X in another tty (F7 - F9). When you run startx you are already logged into the system, so there is no need to start a login manager. When running in graphical mode, the system starts a login manager to authenticate a user how might login.
When you run init 3 from a console, either tty or pts, you are telling the system that you are changing its runlevel (not definitively, just this time) and then (simply put) every piece of software is stopped and the only those programs that run on runlevel 3 are started.
Short answer, since I don't have my linux system in front of me:
Startx executes the script at .xinitrc which probably isn't very customized so it most likely just starts X under the current user.
Init 5 switches to runlevel 5 which, depending on /etc/inittab/, runs scripts contained in /etc/rc5.d (or somewhere similar)
See:
startx:
init: