If a foreign student delivers a baby here in the US is her child a US citizen automatically and can she apply for a permanent residency?

Her child is definitely a US citizen which the baby's birth certificate proves it. but the mother cant apply for residency.