Click here to learn more.
before the expiry of your contract make a written notice to your company about your intention of not renewing. Then request for an NOC. If they are willing to provide you the NOC, you can transfer to any company. If not, your visa and rp will be cancelled and you need to exit qatar. Without the NOC, you can only re-enter qatar via family visa during this 2 year period while the ban is in-effect.
Talk to your actual employer and ask for a NOC.
That is mandatory if you want to come back immediately.
Otherwise you´ll have to wait for 2 yrs before coming back again.