That means either the gnome-panel malfunctioned, nautilus not working, mouse not working or whatever that freezes some components of ubuntu, you now should:
Press ctrl+alt+F(1~7) to go to the terminal
Type 'sudo /etc/init.d/gdm restart'
That’s it. You will be logged out and the gnome is restarted.