What happens to babies if their moms have hiv?

May be infected. Maternal HIV can infect the fetus, but these days there is prophylactic therapy available to minimize the risk.