$PHP_SELF is a variable that holds the location of the currently running PHP script. This can be used to generate a link that calls the current page:
<?php
print "<a href=\"$PHP_SELF">Me</a>";
?>
This can be very useful if you have a page that takes some data and uses that to display something. Say a calendar page that has next and prev month links.
<?php
print "<a href=\"$PHP_SELF?month=dec&year=2001\">Prev</a>";
print "<a href=\"$PHP_SELF?month=feb&year=2002">Next</a>";
?>
I'm sure you can figure out other uses for it. Just know that it's the location of the currently running script, not the location of the file that the current code that is being exxcuted. This can cause you problems when you are expecting included scripts to work a certain way.