This grammar means you must do something. It shows that an action is very important to do.
、に。
I have to go to the embassy to renew my visa.
、。
My child had a fever, so I had to take the day off from work yesterday.
、。
Because I have to study for the exam, I can't go out to have fun.
に、。
In order to win the match, we have to practice more.