What it means
ないといけない expresses an obligation: the speaker or another person must do something or has to do it. It follows the negative form of a verb, even though the complete expression has a positive meaning. The familiar form is used in ordinary informal situations, while ないといけません is the polite counterpart.
Usage note
ないといけない does not mean that the person must not do something. The negative verb form is part of the expression meaning that if the action is not done, it will not be acceptable. Do not confuse it with なくてもいい, which means that an action does not have to be done.
How to use it
明日、病院へ行かないといけません。
I have to go to the hospital tomorrow.
明日、病院へ行かないといけない。
I have to go to the hospital tomorrow.
