Breastfeeding

I understand every women can breastfeed right after labor. But why does the mom milk only come for a few days and cant give anymore. Like theyll have to give their baby formula. I know every womens body is different but why does that happen? I wanna be able to breastfeed my baby when is here but scared it will go away.