Welcome to Apple Support Communities.
First, check to see if your MacBook battery is swelling. It often happens on the white and black MacBooks with removable battery that preceded the late 2008 aluminum and white 'unibody' MacBooks.
The battery can swell enough to distort the topcase and keyboard assembly, causing erratic behavior of both keyboard and trackpad. The effect seems to be more severe, the more the laptop was used while plugged in to the charger.
You can easily check by powering off the computer, removing the battery, connecting to the charger, and restarting to see if the problem goes away.
If removing the battery solves the problem, the solution is a new battery. They are $129 from Apple. There are less expensive batteries available from a variety of internet sources, and a wide range of user experiences, both good and bad, reported in these forums.
Note that if the battery is quite swollen, you might not be able to reinstall the battery, so be sure you have the charger nearby before testing, and until you can get a new battery.
The second post here contains other suggestions that are not related to the battery swelling:
, System Preferences, Hardware, Trackpad, see that 'ignore accidental trackpad input' is checked at the bottom of the Trackpad preferences.