Poland's Prime Minister Beata Szydlo resigned late Thursday and will be replaced by the finance minister, according to a statement from the ruling Law and Justice (PiS) party.