> Like a legally binding agreement your employers would typically give you?
Yes. It's a contract specifying what both the employer and you are agreeing to.
> Like does it guarantee you a job for a certain amount of time, or how does it work?
It can, if that's what you and the employer agree should be in it. It's just a contract like any other. They usually include when your employment will start, what your compensation is, what your duties are, and so forth.
They often also contain noncompete/nondisclosure agreements, agreements on copyright assignments, what happens when your employment ends, and so forth. I'm guessing that most people here have signed them, but perhaps weren't aware that's what they were or that the terms can be negotiated.
Typically, my negotiations involve removing the noncompete. Also, the terms very often include wording to the effect that anything I create during the term of my employment belongs to the company regardless of whether or not company resources/knowledge were used. I always have that removed.
> If the renege on it, can you sue them...?
Sure, just like any other contract. Although most of the ones I've signed have contained arbitration clauses. I've never bothered to try to negotiate those out.
> can I ask what field/vertical you work in?
I'm just a regular software engineer. I've worked for Fortune 500 companies, small companies, startups, and things in between. I'm a generalist currently working on industrial control systems, but prior to that I was in data security. But I've worked in a variety of different sectors over the decades.