WordPress uses this global variable to store the current PHP file being executed, e.g., post.php or edit.php. It is set in [wordpress root folder]/wp-includes/vars.php, which is included in [wordpress root folder/wp-includes/settings.php.
pagenow is used to identify the current action being executed. Ideally, plugin and theme developers need not use this global variable, it is used internally by WordPress. Conditional Tags should be used to identify the current template file.
Back to full list of global variables.