Please refer to the International Conference on Harmonization (ICH) guidelines for more detail.

A quick definition would be:
Potency is a measure of drug activity expressed in terms of the amount required to produce an effect of given intensity.
Purity is a measure of the amount of API present in a sample compared to those of related substances, impurities, residual solvents, etc.