Try connecting an external keyboard and see if works then. If it works fine, then the attached keyboard either has a damaged key or something stuck in it that is making it type on its own. If there is nothing to remove (debris, dust, etc.) then you may have to replace the keyboard.