\documentclass{article}
  \usepackage{makeidx}
  \makeindex
  \begin{document}
  first\index{first}\newpage
  second \newpage
  third\index{third}\newpage
  \printindex
  \end{document}
