It's a rule that when a local (qatari) apply for a post held by expat, the last one will be either downgraded or terminated, depending of the will of the company. WTME! About the visa, you'll be issuued a visit visa (arranged by your company) and once here you'll apply for Resident Permit (kind of working visa).