they MUST either (1) cancel your visa or (2)start transfer of sponsorship process in case you found another job and they don't mind you to work for another company. Once you stop working for the company, they cannot keep you under their sponsorship.
If option 1 is chosen, and the Company cancel your visa, you have to leave Qatar within 7 days from cancellation date.