Makefile.am is actually the simple part and configure.ac is the more complex one. Really all a Makefile.am is a list of what to build, what files it needs, what compile and link options it takes, what (in addition to dependencies) it should include in a distro package, and what subdirectories to go into. info automake should help out, as well as libtool and autoconf. It took me forever just to be patient enough to learn them (because the docs all reference each other) but it's fairly simple once you get the basics. There are also a few make rules you can define to be executed at (un)install time.
Automake will generate a Makefile.in, which is a template makefile, from your Makefile.am. Autoconf will make a ./configure based on your configure.ac, which tells it which options to build that script with. When ./configure is run, it inserts the results of its tests into the generated Makefile.in to create a real makefile.