How do you get listeriosis?

Exposure. Exposure to the listeria bacterium in a large enough dose. Risk factors include drinking unpasteurized milk and eating unpasteurized cheese (usually a soft cheese). A weak immune system helps to contract the disease (pregnancy, hiv/aids, leukemia, etc).
Contaminated foods. Listeriosis is primarily foodborne and occurs often among people who are older, pregnant, or immunocompromised.