Medication and medicine can both refer to a drug you have been prescribed by a healthcare professional. => "He was prescribed a cough medicine/medication by his doctor"
Medicine can also refer to the discipline/medical science itself => "Modern day medicine has saved many lives" / "My brother is studying medicine at university"