Touchpad Blocker is a handy free tool for laptop owners that will disable the trackpad while you type, so accidental clicks won't move the cursor around.
The program works by effectively disabling mouse events for just half a second, every time you press a key. And so if you accidentally tap the trackpad while in the middle of typing, it probably won't have any effect. But if you've finished, and, say, want to save your document, then the trackpad will start working again half a second after the last keypress and you'll be able to use it as normal.
This default delay won't be right for everyone, of course, so you can tweak it to suit your needs. Increasing the threshold to a second, perhaps, will make it even less likely that accidental clicks will have any effect, but also means you'll have to wait longer after pressing a key before you can use the trackpad. So if that's a more annoying problem then you might like to reduce the delay a little; experiment and see what works for you.
It's also possible that Touchpad Blocker won't prove useful with some applications at all, but fortunately the author has considered that, too, providing a customisable hotkey that will allow you to toggle it on and off - very convenient.