Somebody please help a complete newbie in ubuntu!

I just opgraded to Ubuntu 10.04 on my laptop without any problems and programs are running just fine. But at times the following happens:

The mouse turns black and mirrored and the keyboard freezes. Only thing to do is ctrl+alt+f* and sudo shutdown the computer. It's horrible!

It has only happened while using IDL (interactive data language, used by astronomers at my university). And I think it happens when I try to copy a frase by marking it and using the mid-mouse button or right-click: copy. I have not tried with a separate mouse connected to the laptop.

Any ideas? Also please tell me what you need to know about my laptop...