It's with the court. The prosecutor can voluntarily recuse herself which she apparently won't do. Prosecutors have special duties under the Professional Responsibility rules. But a court can also order the "recusal" by dismissing/disqualifying her and her office on the basis of a proven conflict.
Remember there were calls for recusal in the Michael Brown case. Since there was no judicial case, it was up to the prosecutor to follow the ethics rules and determine whether recusal was warranted. (There was also some procedural rule there where the Governor could order a special prosecutor but that is not relevant to recusal.
I did not see any convincing evidence for recusal in the Michael Brown case. The alleged "conflicts" seemed to be he worked with the police for a long time (of course, as he was a consistently re-elected prosecutor) and that his father was a police officer killed by a black man, many years ago, maybe 40? These are pretty flimsy reasons for recusal. The current case with Mosby is very different and I do think an ethical prosecutor should have recused herself in this case. Ethical elected officials should be careful to avoid even the appearance of impropriety. She is a prosecutor but also essentially an elected official.
I haven't yet had a chance to read the Motion but I assume they use the Professional Responsibility rules and are asking the judge to find a conflict under those rules and order the prosecutor to be disqualified under those rules. There may also be Maryland case law that is on point.
The court will not specify who should prosecute. The city, or whoever is authorized under city procedural rules, would need to appoint someone to prosecute. It doesn't become a state case because of this and the state does not oversee local prosecutors or exercise authority over them. I think there may be confusion because Baltimore calls their prosecutor the Baltimore City State's Attorney. Where I live the Prosecutors are called District Attorneys. The "state" attorney as in state of Maryland is the state Attorney General. But Mosby is just the elected prosecutor for the city of Baltimore.
I did find an interesting older (2006) fairly plain English article
http://digitalcommons.lmu.edu/cgi/viewcontent.cgi?article=2543&context=llr
CAVEAT: as always, please not I am NOT a criminal attorney!