A foundling is a child who's been abandoned by their parents. You might also call a foundling a "waif" — and no matter what word you use, your heart will hurt for them.
While a foundling is sometimes an orphan, someone whose parents have died, foundlings are often babies whose parents aren't able to care for them. In cases like this, parents sometimes abandon their babies in safe places like hospitals or churches. Many characters in literature are foundlings, from Oedipus to Superman. Moses is another famous foundling. The word shares a root with found, as in a "found child."