An explanatory/assertive auxiliary (a form of のだ/んだ) used to emphasize or assert that something is the case—stating a fact or reason with confidence.
犯人は彼だったのだ。
It was he who was the culprit.
これは重要なのだ。軽く扱ってはいけない。
This is important. It must not be treated lightly.
そうなったのには理由があるのだ。
There is a reason it turned out that way.
A Kansai-dialect usage: attached after the negative stem of a verb to indicate past negation in a dialectal expression (limited/regional use; not common in standard Japanese).
行かんかったのだ(=行かなかったのだ)と言っていた。
He was saying 'I didn't go' (using dialectal form).
せんかったのだ、という言い方は関西でよく聞く。
The phrase 'sen-katta no da' (didn't do) is often heard in Kansai.