Placenta question

How can your placenta get infected? And how to prevent it ?