"Hang in there" means "don't give up." Specifically, we use "hang in there" when someone is in a difficult or stressful situation. You say this to encourage them:
A: This job is really hard. I don't know if I can do it.
B: Hang in there. You'll get used to it eventually.
"Hang in there" is a little casual but it's fine to use in most situations.