Antibiotics are recommended to prevent infection in anyone exposed to the spores. Ciprofloxacin (Cipro), doxycycline (Monodox, Vibramycin, others) and levofloxacin (Levaquin) are approved by the Food and Drug Administration for post-exposure prevention of anthrax in adults and children.
An anthrax vaccine for humans is available. The vaccine doesn't contain live bacteria and can't lead to infection, but it can cause side effects, ranging from soreness at the injection site to more-serious allergic reactions. The vaccine isn't recommended for children or older adults.
The vaccine isn't intended for the general public. Instead, it's reserved for military personnel, scientists working with anthrax and people in other high-risk professions.
If you live or travel in a country where anthrax is common and herd animals aren't routinely vaccinated, avoid contact with livestock and animal skins as much as possible. Also avoid eating meat that hasn't been properly cooked.
Even in developed countries, it's important to handle any dead animal with care and to take precautions when working with or processing imported hides, fur or wool.