E. coli is primarily transmitted through consumption of contaminated food or water. Common sources include undercooked ground beef, unpasteurized milk, and fresh produce. It can also spread via direct contact with infected individuals or animals, particularly in environments with inadequate hygiene practices.