Does a zero eigenvalue mean that the matrix is not invertible regardless of its diagonalizability? If the matrix $A$ is diagonalizable, then we know that its similar diagonal matrix $D$ has determinant $0$, so the matrix $A$ itself is invertible? However, if $A$ not diagonalizable, how are we sure that the matrix $A$ which has $0$ as eigenvalue is not invertible?
Here I have another confusion, does the degree of the characteristic polynomial  determine the size of matrix. i.e. $\lambda (\lambda+2)^3 (\lambda-1)^2$ has $6\times 6$ matrix?    

If $0$ is an eigenvalue, then there is a nonzero vector $v$ with $Mv = 0$. Then the kernel of $M$ is not trivial (it is at least one-dimensional), and so it is not one-to-one viewed as a linear transformation. Then it is not invertible.
The geometric picture: $M$ 'collapses' the subspace spanned by $v$, and so maps its domain into a hyperplane in its codomain. This picture actually says: $M$ is not onto, but this is another way to assert non-invertibility.
Note that $M$ can still be diagonalizable, as it can still have a basis of eigenvectors, independent of whether or not it 'collapses' some.
