Going from “pillar to post” means moving from one bad situation to another.
The expression comes from the Puritans of New England, who punished those who strayed from their strict moral code by taking them to the pillory where, in public view, their hands and feet were tied until they repented.
If they refused to repent, they were taken to a whipping post and flogged until they acknowledged their sins.
So we say that someone lost is going from “pillar to post”.