You must have a valid work permit from the UAE Ministry of Human Resources and Emiratisation for any type of employment. If you intend to work, establish terms and conditions or sponsorship before starting, to minimise the risk of contractual or labour disputes. Should a dispute arise, a special department of the UAE Ministry of Human Resources and Emiratisation reviews and arbitrates labour claims.
Your employer is responsible for obtaining a residency visa for you. Some companies will obtain getting visas for your family or you may need to do it yourself. This may take some time and you will need to surrender your passport temporarily. You cannot travel out of the UAE whilst your visa is in process. You will need 6 months validity in your passport to obtain a residency visa and travel around the region.
The UAE employers may ask to hold a foreign employee's passport as a condition of employment. While this practice is not unusual, it's against the law. Passports should only be held by an employer for a limited period when arranging, renewing or cancelling your visa or work permit. If you believe your passport is being held unreasonably by your employer, you can lodge a complaint with the UAE Ministry of Human Resources and Emiratisation or seek legal advice.
If you’ve been a resident in the UAE, make sure you cancel your work visa before leaving the country permanently. Otherwise, you may be seen to be absconding and you could be arrested if you return to or even transit the UAE.