how does job queue work? in Server or in Database?

Hi Expert.

We created two new servers for load balance, But we have a job queue tenant, how does the job queue work? the job queue tenant if run both in the two servers? if it will be locked if update at the same time in the two servers?

Any suggestion will be warmly appreciated.