All configuration variables are stored in the includes/config.inc.php file; however it is recommended to never directly edit the file (as failure to adhere to the precise format of entries will result in your forums not working), and to use the Control Panel to adjust your configuration.
All headers/footers are stored in the includes/header*.php and includes/footer*.php (names vary based on if it is a header/footer for each forum, or if it is the general header/footer). The header insert option (CP -> Display -> General) is also kept here as header-insert.php. Additionally, individual forum introductions also exist in this folder.