In definition of the height of the tree I have wrote "Height: The height of any node is the longest path from the node to any leaf (The height of any leaf is 0 )"
and my teacher wrote for me "This is strongly connected with directed edges in the tree under consideration. It is better to note it in the text. (Otherwise, if the leaf will be in another branch then the path can exceed depth of the tree.)"
can someone explain my mistake ?
What your teacher wrote means that for your definition to be intuitive one has to assume that the edges in your tree are directed from the root towards the leaves. Consider the following tree with undirected edges: $V = \{a, b, c, d \} E = \{\{a, b\}, \{b, c\}, \{c, d\} \}$ where $b$ is the root. You would want the height function to do the following: $h(a) = 0, h(b) = 2, h(c) = 1, h(d) = 0$. But according to your definition (if we are in the undirected setting) you get $h(c) = 2$ because the longest path from $c$ to a leaf is $c, b, a$.
When we only consider trees where the edges are directed away from the root (in the example this would mean $E = \{ (b, a), (b, c), (c, d)\}$) then your definition works.