Answer: Motion of no confidence & dissolving of parliament
Explanation:
The prime minister can resign from an office when a motion of no confidence is moved on his behalf, this is when it's noticed that he's no longer fit to run for he position he's occupying. When the motion is passed, He has to resign. And in most cases his cabinet either follows him/her or they are dissolved. New prime minister and members would be elected to fill positions.