\if compares two tokens, independently of what they mean. The test
\if 1<>0 compares
< and yields false, thus you see
1 equals 0. For the sake of the example, if you had,
\if 11<>0 then the test would be true because TeX would compare
1 and the next
1 and would return true. Then the test:
11 is not equal 0.
11 equals 0.
<>0 11 is not equal 0.
because the tokens
<>0 would not be used by
\if, so TeX would simply write them on the output.
To do an integer comparison you need
1 equals 0.
1 is not equal 0.
Also, TeX does not have a not equal to comparison. You can only compare with