[subject] + 不得不 + [verb phrase]
不得不 puts two negatives together – "cannot not" – and means the subject is forced to do something they would rather not. It goes before the verb, and the reason usually comes in the clause before.
得 děi and 必须 also mean "must", but say nothing about being unwilling. 不得不 adds that the subject was pushed into it.
只好 also means settling for the only option left, but it is milder and points at the choice that was made. 不得不 stresses the pressure behind it.
不得 on its own means "must not", in rules and signs. Dropping or adding the second 不 reverses the meaning.
不得不承认 "I have to admit" is a set phrase for conceding a point.