I saw T. Jech, 'Set theory' Lemma 3.10:
An infinite cardinal $\kappa$ is singular iff there exists a cardinal $\lambda<\kappa$ and a family $\{S_\xi :\xi<\lambda\}$ of subsets of $\kappa$ s.t. $|S_\xi|<\kappa$ for each $\xi<\lambda$, and $\kappa=\bigcup_{\xi<\lambda}S_\xi$. The least cardinal $\lambda$ that satisfies the condition is $\operatorname{cf}\kappa$.
and this book gives proof of this lemma:
Proof: (I omitted the front of this proof)
If the conditions holds, let $\lambda<\kappa$ be the least cardinal for which there is a family $\{S_\xi :\xi<\lambda\}$ s.t. $\kappa=\bigcup_{\xi<\lambda}S_\xi$ and $|S_\xi|<\kappa$ for each $\xi<\lambda$. For every $|S_\xi|<\kappa$, let $\beta_\xi$ be the order-type of $\bigcup_{\nu<\xi}S_\nu$. The sequence $\langle \beta_\xi :\xi<\lambda\rangle$ is nondecreasing, and by the minimality of $\lambda$, $\beta_\xi<\kappa$ for all $\xi<\lambda$. We shall show that $\lim_\xi\beta_\xi=\kappa$, thus proving that $\operatorname{cf}\kappa\le\lambda$.
Let $\beta=\lim_\xi\beta_\xi$. There is one-to-one mapping $f$ of $\kappa=\bigcup_{\xi<\lambda}S_\xi$ into $\lambda \times \beta$: If $\alpha\in\kappa$, let $f(\alpha)=(\xi,\gamma)$, where $\xi$ is the least $\xi$ s.t. $\alpha\in S_\xi$ and $\gamma$ is order-type of $S_\xi\cap\alpha$. Since $\lambda<\kappa$ and $|\lambda\times\beta|=|=\lambda\cdot|\beta|$, it follows that $\beta=\kappa$.
But I don't understand why $f$ is one-to-one function. How to understand it? How to prove that $f$ is one-to-one? Thanks in advance.
Assume that $f(\alpha)=(\beta,\xi)=f(\alpha')$. Then $\alpha\in S_\xi$, and $\gamma$ is the order type of $S_\xi\cap \alpha$. But the same is true for $\alpha'$.
So $S_\xi \cap \alpha$ and $S_\xi \cap \alpha'$ have the same order type. But if $\alpha<\alpha'$, the order type of $S_\xi \cap \alpha$ would be a proper initial segment of the order type of $S_\xi \cap \alpha'$, which is impossible (as a proper initial segment of a well-order is never isomorphic to the whole well-order.