I know that if $\alpha$ is algebraic over $F$ then $F(\alpha)=F[\alpha]$. Also i know the fact that $\frac {\mathbb Z_2[X]}{(X^2+1)}\cong \mathbb Z_2[i]$ Also $i$ satisfies the polynomial $X^2+1$ over $F_2$, so $i$ is algebraic over $\mathbb{Z_2}$ hence $\mathbb Z_2[i] =\mathbb Z_2(i)$ which is not true because $\frac {\mathbb Z_2[X]}{(X^2+1)}$ is not a field.
What is the mistake in above argument?
The mistake is that, apparently, you mean $\;\Bbb Z_2=\Bbb F_2:=\;$ the field with two elements, and here we have that
$$x^2+1=(x+1)^2\implies\Bbb F_2[x]/\langle x^2+1\rangle=\Bbb F_2[x]/\langle(x+1)^2\rangle$$