Matrix multiplication of 2 matrices $g$ $h$ to $R=g\cdot h$ is defined as
$$R_{mn} = \sum\limits_l g_{ml} h_{ln}$$
This can be found in each book on linear algebra or in any handbook on math.
If the result matrix is the identity $I$, one could write:
$$I_{mn} = \sum\limits_l g_{ml} h_{ln}$$
The Kronecker symbol actually is identical with the identity matrix. It is 1 if the indices $m$ and $n$ are equal (the same), and zero if they do not agree. It does not matter here if the indices are up or down. One has to keep in mind that if one works with co-variant (index down) and contra-variant (index up) indices, if the summation over an specific index is done, the index should be in one matrix up and the other matrix down. The order does not matter for tensors (attention with spinors).
Then I write:
$$\delta_m^n = \sum\limits_l g_{ml} h^{ln}$$
This does not change the algebra of the matrix multiplication, the summation still goes over the second index of the first matrix and the first index of the second matrix.
As the Kronecker symbol symbolizes the matrix elements of the identity matrix
we have now in index-free formulation:
$$ I = g\cdot h $$
obviously $h$ is the inverse matrix of $g$, so I can write
$$ I = g \cdot g^{-1}$$
so we learn that $h^{ln}$ symbolize the matrix elements of the inverse metric tensor matrix $g$. For convenience we abbreviate $h^{ln}$
with the same letter, i.e. $g$, since we can it always distinguish it from $g$'s matrix elements $g_{mn}$ since the indices are up with respect to the matrix element indices of $g$ which are down:
$$h^{ln} \equiv g^{ln}:=(g^{-1})_{ln} \quad\text{whereas}\quad (g)_{ln} = g_{ln}$$
The latter makes only sense if co- and contravariant index formalism is applied.
Therefore:
$$\delta^{n}_m = \sum\limits_l g_{ml} g^{ln}$$
Finally usually when working with indices, Einstein's summation convention is applied, i.e. the summation symbol is omitted, and the summation is assumed (implicitly) on the indices which appear twice and in case of covariant and contravariant indices the summation should take place on the index (or indices) of which one appear down and the other up. In our case the only index where this occurs is $l$, we can omit the summation symbol $\Sigma$:
$$\delta^{n}_m = g_{ml} g^{ln}$$
That's it.
The use of covariant and contravariant indices is always useful if the scalar product of 2 vectors is not just:
$$ s = \sum\limits_{ij} \delta_{ij} a_i b_j = \sum\limits_{i} a_i b_i$$
but involves a non-trivial matrix for instance $g$:
$$ t = \sum\limits_{ij} g_{ij} a^i b^j = \sum\limits_{j} a_j b^j$$
In classical mechanics the first scalar product is common (except one works in a symplectic space), so co- and contravariant indices are not necessary.
However, in (already special) relativity the scalar product is non-trivial, therefore the introduction of a metric as well as co- and contravariant indices are useful.