In utero, your baby's lungs are filled with amniotic fluid (which is essentially composed of shed skin cells, fetal urine, etc.) and are "inflated". The baby doesn't receive oxygen this way; your baby gets his/her oxygen through your umbilical cord. I have seen sites that mention something about the baby "practicing breathing motions" while in utero, but if any site is claiming that they actually breathe while they are inside of you, it is incorrect.
When your baby is born vaginally, the act of squeezing through the vaginal opening basically compresses the baby's chest and squeezes out that fluid. When an infant is born via c-section, he/she misses out on this natural squeezing, and thus is prone to more respiratory complications than if it had been born vaginally.
If meconium (which is the baby's fecal matter- a thick, slick, sticky, evergreen colored stool) is passed while your baby is still inside of you, it can cover the baby's skin (including the face and mouth) and can get into the oral cavity while the baby is still within your amniotic sac. When the baby is born and takes his/her first breath, it may actually inhale that meconium, as Mimi mentioned, which can be a serious problem. If a baby is born after passing meconium inside of you, the doctors wouldn't stimulate the baby (like you see in the movies- a pat on the bottom? Though that, too, is a misrepresentation; stimulation usually comes from rubbing the baby, not hitting!). Instead, they'd quickly take the baby to a warmer while suctioning his/her mouth and throat to get the meconium out before the baby tries to breathe.