It all depends on what you call a session 'ending'. Even when a user closes all his/her browser windows, the session remains active on the server. Of course, if the user reopens the browser and returns to the site, he/she will be assigned a new session, since his/her browser deleted the original session cookie when it was closed.
You see, Web servers have no way of knowing when someone has left a site besides the fact that requests accompanied by the session ID stop coming in. So what has to happen is that a session timeout is defined on the server. In your case, you've defined it to be 24 minutes. Thus, (roughly) 24 minutes after the server last sees a request with a particular session ID, that session will be deleted from the server.
From the user's point of view, the session will be terminated when he or she closes the browser, since at that point the browser forgets its session ID and can no longer send requests for that session. Also from the user's point of view, the session will expire if he or she doesn't load a page for an extended period (in your case, 24 minutes). From the server's point of view, however, sessions can only end one way (assuming they are not explicitly ended by a script): after a defined timeout during which no requests come in for a session, it will be destroyed automatically.
Hope this clears things up!