Follow up Drupal path to PHP function
You can find out from the implementing module's implementation of hook_menu.

In your case, look for where Flag implements hook_menu (in the case of Flag 7.x-3.x you're looking at flag.module at around line 301. 
Next, look for where the module declares $items['flag/%/%flag/%'], and look for the page callback array key. You can see it says flag_page, so you can tell the menu callback is calling the flag_page.

You can find the Drupal 7 documentation for hook_menu here.