dough - ja sorry det er ud i et. Anyway så fra the not so short intro to latex2e:
To enable the indexing feature of LATEX, the makeidx package must be
loaded in the preamble with:
\usepackage{makeidx}
and the special indexing commands must be enabled by putting the
\makeindex
command into the input file preamble.
The content of the index is specified with
\index{key}
commands, where key is the index entry. You enter the index commands
at the points in the text that you want the final index entries to point to.
Table 4.2 explains the syntax of the key argument with several examples.
When the input file is processed with LATEX, each \index command
writes an appropriate index entry, together with the current page number,
to a special file. The file has the same name as the LATEX input file, but
a dierent extension (.idx). This .idx file can then be processed with the
makeindex program.
makeindex filename
http://people.ee.ethz.ch/~oetiker/lshort/lshort.pdf