The fragment identifier is the hash symbol followed by some text. For example: #content1
More detail can be found at http://en.wikipedia.org/wiki/Fragment_identifier
But basically, it's how you tell the web browser that you want to scroll the page down to the part of the page that has that identifier.
How it can be used with scripting, it to disable the default web browser behaviour, and to instead use the fragment identifier from the link as a way to identify the area of interest, in this case that would be showing the related content area, after first hiding them all.