If is a continuous, symmetric function (which means ) and positive semidefinite, then there exist a mapping such that:

and is a valid kernel.

Positive Semidefinite (PSD)

The condition is:

Basically it means that the two functions will never produce a negative similarity energy. Energy here refers to something like squared length.

The reason why we need PSD is because without PSD, we could have some squared lengths that could be negative. Which is wrong.

You can read more in Functional Analysis textbooks.