Chile has become the latest country in the region to elect a right-wing president.