Adding linebreaks and comments:
<?php
$title = $cfg && is_object($cfg) // if $cfg isn't empty (false, 0, null) and it's an object
? $cfg->getTitle() // then set $title to the return of getTitle()
: 'Apptitle :: My First App'; // otherwise use this as a default
?>
<?=Format::htmlchars($title)?> // this is a shortcut for echo. it probably escapes
// special characters: < becomes < etc
// it doesn't change any values: it just echoes
Basically all it's doing is checking your $cfg
object (whatever that is) to see if there's a title
set - if not, it provides a default. It then prints it to the screen in a html-friendly way. Nothing to do with sessions or anything like that.
Another quick point: in your own code, you should avoid using the shortcut <?=
since it's not very portable. That is, even though it might work on your testing server, your deployment site or someone else who wants to use your code might have it turned off. It's recommended to avoid it.