The Labour leader plans to lead a caretaker government after winning a no-confidence vote in the government.