You don't. It naturally stops on it's own. It will stop faster if everyone gets vaccinated so they can't get it and then pass it on. If it is necessary, countries have the ability to quarantine sick citizens, and prevent entry of those with acute infectious diseases at the borders. You can also lessen the spread by preventive measures such as good hand washing, and avoiding crowded locations.
Chat with our AI personalities
1) Networks of hospitals, the CDC, WHO, and other medical personnel need to identify and track the spread of the epidemic
2) Quarantine measures need to be enacted to prevent the spread of the epidemic
3) Samples should be taken of the disease, and analysis should be performed to try to identify and type the disease so that a vaccine can be found
4) Vaccinations should be administered to unaffected individuals (starting with healthcare workers, other people in the field, the elderly, and small children) to prevent them from contracting the illness without immunity (reducing its duration or preventing infection in the population)
5) Public hygiene campaigns (cover nose and mouth when sneezing and coughing, wash hands, etc.) should be publicized to educate the public about ways in which they can prevent contracting or spreading disease
You can not get 'Rid' of the communicable diseases. There are large number of viruses and you can not prepare the vaccines for all at present. Man is a social animal and he can not live without the society. (Although he spends most of the time in fighting and competing with the others in the society.)
In the time of the black plague, the best thing to do was hunker you village down, and lower foreign contact to a zero. Translation, close city gates, keep out traders.