It's probably a physical problem with the keyboard - either a key is stuck down (easy to fix) or it's done for. An external USB keyboard is definitely the first thing to try, though if your internal keyboard is surreptitiously inputting random key presses it might be confusing to diagnose (so you might want to try disconnecting the internal keyboard first). Testing the keyboard in an Ubuntu/Linux live CD would rule out a software problem as well.
I had a MacBook in the shop today which was having major keyboard/trackpad issues. I found that the internals of the laptop (including the keyboard connection) were really dirty, and after cleaning everything and reseating the connections, I was amazed to see that most of the keys on the keyboard were working whereas before, most of the keys did not work and the mouse would move erratically and click randomly.
So removing the keyboard and reseating the internal connector is definitely worth a shot. Otherwise, replacement keyboards for your laptop are about $20; a job you can quickly, easily and inexpensively do yourself.