How is energy conserved in a transformation?

How is energy conserved in a transformation?