We can use Prüfer sequences (of length $n-2$) to find the labeled spanning trees for $K_n$, using the following decoding algorithm, by Cayley’s theorem the number of spanning trees are $n^{n-2}$.
For $n=5$, there are $5^3=125$ such spanning trees on $5$ labeled vertices, as can be computed using the above algorithm
and seen from the following animation: