My teacher said that in $3-$ dimension $\delta_{ii}=3$, but why?
Kronecker delta's definition:
$$\delta_{ij}=\begin{cases}0& \text{if}\; i\neq j \\ 1 & \text{if}\; i=j \end{cases}$$
According to the definition $\delta_{ij}(j\to i)=\delta_{ii}=^?1$
My teacher said since we do not know the $i$ so there is a secret sum in $\delta$ so we get $\delta_{11}+\delta_{22}+\delta_{33}=3$. Why? In the definition I cannot see this implication.
It's just the trace, written with the Einstein summation convention:
$$\delta_{ii} = \delta_{11} + \delta_{22} + \delta_{33} = 3$$
$$\delta_{ij} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} $$
Einstein summation convention
When the same index is repeated inside an expression, it means summation over the repeated index:
$$A_{ii} = \sum_{i = 1}^{n} A_{ii} = A_{11} + A_{22} + \ldots + A_{nn}$$