Medicine is the science of diseases. Other words for medicine are the art of healing and the science of healing. Medicine wants to know how best to protect people or animals from disease, or how to make them well.
By a medical doctor, you usually mean a scientist who does research. Doctors are people who treat sick people. Caregivers make sure someone gets really well faster. Pharmacists make and sell medicines. You can only do all this if you have passed an exam. Medical doctors, physicians and pharmacists must have studied at a university.
Veterinarians also have to go through a long course of study before they are allowed to treat animals. But veterinarians also do other things: some check the meat before we buy it from the butcher to make sure it doesn't make us sick.