Bits of dust, air or liquids can get between the matrix inside the keyboard and make it stick on certain keys or make them behave strangely.
Heavy, excessive bashing of keys can also damage the matrix.
Not really fixable, far easier just to replace the keyboard...