I am attempting to write a Wordpress Plug-in but can't appear to determine the way you would modify the way a URL will get handled, so for instance: any demands designed for:

<url>/?myplugin=<pageID>

can get handled with a function during my plug-in. I am sure this can be a quite simple to complete, but I am pretty a new comer to dealing with Wordpress and could not think it is within the documentation.

add_action('parse_request', 'my_custom_url_handler');
function my_custom_url_handler() {
  if( isset($_GET['myplugin']) ) {
    // do something
    exit();
  }
}

Which should set yourself on the best direction. parse_request happens before WordPress runs the complicated WordPress queries used to obtain the posts for that current URL.