What is the difference between pharmacology and pharmacy?

Pharmacology is the study of the sources, uses, and mechanisms of action of drugs. That is what the body does to drugs (pharmacokinetics) and what drugs do to the body (pharmacodynamics).

Pharmacy is the science or practice of the preparation, formulation,  and dispensing of medicinal drugs.