Your machine boots into runlevel 5 which means that it will start X automatically. If you don't want to start X automatically boot into runlevel 3 for instance. The runlevel you boot into is controlled by the file /etc/inittab. You will find a line in there looking like this:
All you have to do is to switch the '5' to a '3' and it will not try to start X automatically. Now it sounds like your machine didn't really lock up completely so you can get out of X to a terminal by hitting Ctrl+Alt+F1 (or F2,F3..F6). At that point you can edit /etc/inittab (using vi, pico, nano or whatever your favorite editor is). You can also kill X at any point by hitting Crtl+Alt+Backspace. Note that X will be respawned automatically if you are in runlevel 5.
As to your oroginal problem, I am sure someone will be able to help once they have the log.