Here you create a new session object, and place the pointer to the object in $session.
Anyway, better look
here if you want to learn about sessions (that was one click away from the first page you entered :) )
For your info, you need to store the session information on the webserver (either in a database, or on a file on the server). When you do another request and send your 'ticket' (session id), the server reads the proper session, and knows about your session data that is stored.
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.