You just need to stop X. From your desktop, which I assume is Gnome if you are using Ubuntu, do ctrl>alt>F1 then once you are at the command prompt type /etc/init.d/gdm stop that should stop X. Once you have the driver installed either just reboot or type /etc/init.d/gdm start
Alternately you could just log in in safe mode, install the driver then reboot. Hope this helps.
BTW: You will need root privileges to do this.