So, it gets the character, compares it against the EOF character. It's most likely not equal to it, and so that boolean will become 1 and get assigned to i. This happens because the != operator has a higher precedence than the assignment operator.
There is another problem with your code.
EOF is usually defined as the int -1. If you assign it to a char then the value will be truncated and the test will never be true.
BTW that is the reason why getchar() returns an int and not a char.