If the two states have a reciprocal agreement, you don't wind up paying both states. Again if the states have this agreement (most do), you will have to file with Illinois to get back your Illinois withholding, and file with Iowa to pay them. You may be out some money for a while, but net you will pay only one state (Iowa) on the same income. Also, VERY IMPORTANT--Instruct your employer or his payroll service to stop withholding Illinois taxes. If they'll withhold for Iowa, fine; otherwise, you'll need to make quarterly estimated tax payments to Iowa. Employers are not obligated to withhold for states other than their own, but some do as a courtesy to their employees.
Also, since we're this far into the new year, be advised that you'll have to file with Illinois again next year for 2019.
And if the two states do not have an agreement, then it gets complicated. See a professional if this is the case.