A vaccine prevents disease. It contains a dead or weakened pathogen, or just its antigens, which cannot cause the disease but do trigger an immune response. The body makes memory cells, so if the real pathogen infects later the response is much faster and the person does not become ill. If most of a population is vaccinated, the pathogen spreads poorly and unvaccinated people are also protected. This is herd immunity, and it is one reason why vaccinating children routinely is debated and researched.
Medicines treat a disease that has already started. Antibiotics kill bacteria, or stop them growing, but they do not work against viruses because viruses live inside host cells. Antivirals stop viruses reproducing, and each one works against particular viruses. Overuse of antibiotics lets resistant bacteria spread.
An antiseptic is a chemical that kills microorganisms on the skin or on surfaces, for example before an operation. Antiseptics are too harmful to be taken into the body, so they are not used as medicines inside it.