About kconfig.pl

who can tell me how the "script/kconfig.pl" working?
befor and after "make kernel_menuconfig" to $kernel_path/.config
befor and after "make" to $kernel_path/.config

thx