The URL in your browser’s bar can have a query string with parameters specified. The query string is the part at the end of the URL after the question mark (?). The parameters in the query string are in the form of name=value. Each name=value pair is separated by an ampersand (&).
The ‘id’ is the name of a name=value pair in the query string. The getParameters() method returns a map of all of the name=value pairs, with the keys being the name and the values being the value.
So, if your URL has id=001000001234xyf2 the id will be a key in the Map returned by getParameters() that has a value of 001000001234xyf2 . Your first line of code gets the value from the map using the get method and assigns it to a local variable AccId. That value is then used in the SOQL query in the :AccId portion of the query. Statements preceded by a colon(:) in a SOQL query are referred to as bind expressions. The value of the AccId variable is retrieved and replaced in the query by the Apex parser.