A lot of people interchange the use of hold on and hang on probably because they seem the same in the beginning. Take note that they sort of mean a little bit different from each other. When you say hang on, this means that you may be holding on to something that will cause you not to fall. For example, if you are going to fall off from a ledge of a building.
People will tell you to hang on to something before you can be properly saved. When people say that you should hold on, you may be holding on to something that is an actual material thing, or it may be something that is related to your feelings. You are trying your best to hold something that you may be grasping.
Hold on contains the word hold, which is a verb. It implies grasping onto something tightly. In the literal sense, it means to grasp tightly with your hands. Hold on is also something people say on the phone when they need a minute to do something and then come back.
Hanging on refers more to cling onto, which is a step above grasping. Hang on, as in the case of hold on, means to wait for a short period of time. Hang on is generally not used in the figurative sense, but it means to keep going.