Makefile.am -- a user input file to automake
configure.in -- a user input file to autoconf
autoconf generates configure from configure.in
automake gererates Makefile.in from Makefile.am
configure generates Makefile from Makefile.in
The real process is much more complicated, of cource.
Correct me if I am wrong.
A great resource for learning GNU autotools.