From Quake Wiki
Config files are plain text files with a .cfg extension that Quake stores player settings, such as keyboard controls in. They are normally stored in game directories, such as the default ID1 directory, as well as in the game dir of other mods.
Some configuration files are loaded automatically at startup, but players can create their own config files and load them at the console using the exec command.
config.cfg is used to store player settings, such as controls, player colours and name. Some modern engines, such as FitzQuake and derivatives use this file to store all settings, but older versions of the Quake engine did not write certain settings.
autoexec.cfg is used to store commands the player wants the engine to automatically execute at startup. Often, players will add graphics settings and commands that were not usually saved in config.cfg, such as +mlook in here. Place this file in the id folder inside your main game folder.