You can use enumerate
and to style it, use enumitem
package.
\documentclass{article}
\usepackage{enumitem}
\usepackage{kantlipsum}
\begin{document}
\kant[1-2]
\begin{enumerate}[label=\arabic*,leftmargin=*,labelsep=2ex,ref=\arabic*]
\item First chapter \dotfill 2
\begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
\item First section \dotfill 3
\begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
\item First sub section \dotfill 4
\end{enumerate}
\end{enumerate}
\item Second chapter \dotfill 10
\begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
\item First section \dotfill 12
\begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
\item First sub section \dotfill 13
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{document}
More styling like adjusting the vertical separation etc can be done and left as an exercise. For details, refer enumitem
manual.
\addcontentsline
. For example,\addcontentsline{toc}{chapter}{Appendix}