I understand instance of class like
Application? What does it include? Why do we need this class?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.Sign up to join this community
According to the Joomla API reference manual getApplication returns the global CMSApplication object, only creating it if it doesn't already exist.
Imagine getApplication calls the guts behind Joomla to be used in all of your other site methods.
As an example:
$app = JFactory::getApplication(); //SAY YOU WANT TO SET A USER STATE VALUE $app->setUserState('option.mystate','1');
getApplication references all of the other needed functionality for Joomla that allows you to access the core methods of the CMS, in this instance setUserState.