Ex post facto means "after the fact" or retroactive. An ex post facto law is one that has retroactive effect. The U.S. Constitution prohibits both the federal government (Article I, Section 9, Clause 3) and the states (Article I, Section 10, Clause 1) from passing ex post facto criminal laws.
Ex post facto laws that are not criminal in nature are allowed. Only one of out nine Supreme Court Justices (Clarence Thomas) thinks that prohibition against ex post facto laws should extend to non-criminal conduct also.
At the Constitutional Convention, George Mason of Virginia was concerned about protecting the rights of debtors (people who owed money). He opposed the ex post facto law out of fear that it would be applied to prevent debt-relief legislation. His objection was voted down.