I know there are different ways to approach the JNF, one popular of them being expanding the Eigenspace by taking a potence of $\ker (f-\lambda id)$ where $f$ is an Endomorphism and $\lambda$ an Eigenvalue of the respective Eigenspace, where I will just care about one (the one of $\lambda$ in the following).
After expanding to the generalized eigenspace and showing the cyclic decomposition of the vector space one considers the nilpotent endomorphism $(f-\lambda id)$ and finds a decomposition again.
I know that $f\ker(f-\lambda id)^k=\lambda\ker(f-\lambda id)^k$.
But if we build the JNF matrix, we have something like this
$f\ker(f-\lambda id)^k=\ker(f-\lambda id)^{k+1}+\lambda\ker(f-\lambda id)^k$.
otherwise the JNF wouldn't have the form it does. My problem is, although I get the decompositions, I don' t understand how the basis is obtained, or why the construction of the matrix has too look like above.