iPad typing by itself
If you are typing, and it is not responding, but yet it starts typing by itself afterward, this is probably the effect of a slow down of your CPU or running out of RAM. When this happens, the keyboard does not show a key clicked, or a word typed until after you actually tapped the key.

In order to fix it:: try shutting down all open apps by double-pressing the Home button, holding down one of the apps until little red badges pop-up on all of them, and tapping that little red badge on each app until they all disappear.

Then do a hard restart:: Hold down the Sleep and Home buttons until the device turns off, then hold the Sleep button until you get the boot screen to turn it back on.

Test it out. Hope this helps.

UPDATE

In newer versions of iOS, the method to shutting down applications has changed. Instead, your open applications appear as tiles that you may scroll left to right. Swipe each of these up to shut off all of your open apps.