"Hang on" is used in everyday conversation to mean that the person to whom it is said should wait, stay around or persevere.
In another sense "Hang on" means to depend on, to be affected by or to be contingent on.
In literal terms, of course, "Hang on" is an expression which tells the person to hold on or grip something (or somebody too).
1. While the boss was dictating a letter to his secretary, he got a phone call & when his secretary got up to leave, he told her, "Hang on a second. I want to dictate some more".
2. When the school bell rang and the students rushed to pack away their books, the teacher rapped his ruler on the table and said "Hang on class! I want to give you some homework"
3. When the trekker slipped down the hillside, the guide shouted at him "Hang on to the rope! I will haul you up"