In simple terms, you might think of NaN resulting from something that's undefined for real numbers -- for example, trying to obtain the square root of a negative number. See
Wikipedia - NaN for more details.
As to why comparisons return false, consider that NaN is... Well, not a number. In other words, it's
non-ordinal so it can't be considered "greater than," "less than," or even "equal to" some other quantity.
Note however that NaN != NaN returns true, so a float or double is NaN if it is
not equal to itself (for example, x != x).