This isn't clear; it's never been tried.
The workaround is that the College of Cardinals submits a dubia for him to answer; if he doesn't provide the correct answer to clear up a matter, his words have no weight and the laity is free to ignore them. (See: "Amoris Laetitia".)
The short answer is there is no mechanism to remove a pope from office.