once set, a session variable is available to any page on your site.
There is nothing special to transfer a session from one page to the next.
the only key is to make sure to tell PHP to look for the session using the following code at line 1:
<?php @session_start(); ?>
when to clear a session depends entirely on what the session is intended for.
in the example of a login, you use the clear session behavior on the logout page to log the user out.