Apparently, the idea to isolate the ill from the healthy has been around for thousands of years. As far back as the Old Testament, rules were put in place to separate lepers from the rest of society. From ancient times, people understood that diseases could spread, and that the best way to prevent an epidemic is to separate those who are ill. However, it wasn't until the 1300s, with the immense destruction and spread of the plague, that quarantines became official, begining in Ragusa (what is now Croatia). Ships were forced to wait 30 days before docking, and a place outside of the city was built to contain the sick. These regulations became commonplace across Europe for the next few hundred years. That is, until the cholera epidemics in the 1800s made the lack of quarantine uniformity on the international level apparent. Disease prevention was turned over to the federal governments of both Europe and America. Now, with the advent of bacteriology, the length and type of quarantine is based on the life cycle of the specific microbe. Unfortunately, there are still many diseases, such as HIV/AIDS, where quarantine is not effective. Quarantine has its limitations; it is not just a medical issue, but an ethical and legal one as well.
For information on the history of quarantine, visit http://www.pbs.org/wgbh/nova/typhoid/quarantine.html