Bacteria infections

Melissa
Can anyone tell me what causes bacteria infections and what can prevent it?