I know maybe my question is off-topic and I'm sorry about that.
I recently fell into group theory and I confused with exact definition of field.
My teacher says:
$Z_{x}$ is a field if and only if $x$ is a prime power such as $p^n$ where $p$ is prime and $n$ is a positive Integer.
according to this sentence we can conclude $Z_{4}$ is a field too, but I believe it shouldn't be a field because it doesn't satisfy the inverse multiplication property.
some websites such as Wikipedia indicates:
The number of elements of a finite field is called its order or, sometimes, its size. A finite field of order $q$ exists if and only if the order $q$ is a prime power $p^k$ (where $p$ is a prime number and $k$ is a positive integer). In a field of order $p^k$, adding $p$ copies of any element always results in zero; that is, the characteristic of the field is $p$.
due to this paragraph $Z_{4}$ should be a finite field while it isn't a field.
So my question is: Did my teacher make a mistake? Is finite field the same ring? if not then what is different between finite field and ring?
I read almost all related pages in internet to find out the difference between field and finite field but none of them explained exactly and now I'm still confused about it, so I decided to ask here.
A finite field is a field. A field, whether finite or infinite, has no zero divisors. If by $\mathbf{Z}_4$ you mean $\mathbf{Z}/4\mathbf{Z}$, the ring of integers modulo $4$, then you are correct that that ring has zero divisors and is therefore not a field. There is a field with four elements, but it is different from $\mathbf{Z}/4\mathbf{Z}$. With respect to addition, this field looks like $(\mathbf{Z}/2\mathbf{Z})\times(\mathbf{Z}/2\mathbf{Z})$. With respect to multiplication, its structure is more involved; it should be easy to locate sources describing the construction.
Here is a brief summary: in the field $\mathbf{Z}/2\mathbf{Z}$ there is no solution to the equation $x^2+x+1=0$ (since $\mathbf{Z}/2\mathbf{Z}$ has only two elements, $0$ and $1$, and neither solves the equation). We may extend the field $\mathbf{Z}/2\mathbf{Z}$ by including a new element $x$ that solves the equation above, in much the same way as we extend $\mathbf{R}$ by including a solution to $x^2+1=0$. The result is a field with four elements. So elements of the extended field include $0$, $1$, $x$, and $x+1$. You might ask, "what about $x^2$, etc.?" But since $x$ satisfies $x^2+x+1=0$, we can always eliminate $x^2$ and higher powers of $x$. This is analogous to using $i^2=-1$ to eliminate higher powers of $i$ when working with complex numbers. You can verify that the non-zero elements of this new field form a cyclic group of order $3$: $$ 1, x, x^2, x^3, x^4, x^5,\ldots=1, x, x+1, 1, x, x+1, \ldots. $$
Note that finite fields are unique up to isomorphism.
Hope this helps.