We want to quantify the similarity of two elements of a set. In other words, we want a function which associates two objects of a set with a real number quantifying how similar they are. Our intuition comes from distance functions.
A similarity function is a function on a cross product of a set with itself that is zero on all ordered pairs whose first and second coordinates are the same. Notice that a similarity function can associate zero with ordered pairs of different elements also. That is, on pairs of non-identical elements. However, this value must be nonnegative. The similarity function may or may not be symmetric.