Chald,
Start on the Documentation page,
http://no.longer.valid/phpwiki. Read everything under Basic documentation. 'Key Concepts", Architecture overview' and 'Customizing' will give you a general overview of how the template system is designed and howto manipulate config files.
For information on each config file and how they are used, you will need to look at the man pages and any other documentation associated with the programs you want to reconfigure.