[verb ない-form] ない → ざる [する] → せざる [来る] → 来ざる [verb ない-form] ない → ざるを得ない [verb ない-form] ない → ざる + [noun]
ざる is an old written negative, meaning the same as ない. It takes the place of ない on the ない-form – いかない行かない → いか行かざる, たべない食べない → たべ食べざる – and today it lives on mainly in ざるを得ない, "have no choice but to".
ざるを得ない is a separate grammar point with its own contrasts.
ざる also describes a noun, as a formal "un-" or "who does not". This survives in set phrases and in written Japanese.
Outside ざるを得ない, ざる sounds old and literary, and in speech you say ない: よき予期しない, はたらかない働かないひと人. ざるを得ない itself is common in writing, the news and formal speech; in conversation, しかない says much the same.