What is the Ex Post Facto Law?

Ex post facto refers to a law that is created making an act a crime after it was committed. It becomes illegal even if it was legal when the act was committed.