
According to the gospels, Mary became pregnant with Jesus through a divine action. Luke 1:26-35 says that the angel Gabriel visited her beforehand and told her that "the Holy Spirit will come upon you, and the power of the Most High will overshadow you." Matthew 1:18 says that "she was found to be with child through the Holy Spirit."
When Mary became pregnant, she was engaged (but still unmarried) to Joseph. Matthew 1:19-24 says that Joseph wanted to call off the marriage after he found out about the pregnancy. But then an angel appeared to him in a dream, told him about Jesus, and convinced him to accept Mary as his wife. Matthew 1:25 says that he "had no union with her until she gave birth to a son", thus confirming that it was a virgin birth.
Jewish girls of that period usually became engaged when they were twelve or thirteen years old. Actually, for legal purposes this engagement was regarded as the first stage of a marriage, although the girl would normally remain with her parents for at least a year before going to live with her husband and consummating the marriage. If she became pregnant before then, she would face public disgrace, and if the law was strictly enforced, could even be executed as an adulteress. Thus, Joseph's initial suspicions about Mary's pregnancy may have put her into a very difficult situation. According to Luke 1:36-56, at some point she went to live with her relative Elizabeth in Judea and stayed there for three months. Some scholars have suggested that she made this visit to avoid the humiliation she would have experienced in her home town. If so, Joseph's decision to proceed with the marriage may have been a great relief.
Many Christians believe that Mary remained a virgin throughout her life. But Matthew 13:55-56 and Mark 6:3 say that Jesus had four brothers and at least two sisters. Some people argue that these must have been step-brothers and step-sisters, or even cousins. However, most biblical scholars believe they were children of Mary and Joseph who were born after Jesus. One often-cited passage is Luke 2:7, which refers to Jesus as Mary's "first-born", thus implying that she had other children later.
According to Saint Augustine and some other early Christian writers, Mary didn't feel any labor pains when she gave birth to Jesus. These writers believed that labor pains are a curse that God put on women because of Eve's misbehavior in the Garden of Eden (see Genesis 3:16). But since Mary conceived Jesus in a divine manner, the curse didn't apply to her, and therefore the birth was painless. The Roman Catholic Church officially affirmed these conclusions at the Council of Trent (1545-1563).
Many scholars doubt the story of the virgin birth. One reason for this is that the oldest known references to it are in Matthew and Luke, both of which were probably written at least eighty years after Jesus was born. Earlier writers such as Paul and Mark never mention it. This suggests that the idea wasn't part of the earliest tradition about Jesus.
There were also doubts about the story in ancient times. Various sources suggest that Mary was either seduced or raped, and that her family and friends tried to cover it up. There was even a rumor that the real father of Jesus was a Roman soldier variously known as Panthera, Pandera, or Pantera. Such possibilities are examined in detail by Dr. Jane Schaberg in her book The Illegitimacy of Jesus. This book presents evidence which may support the idea that Mary's pregnancy was the result of a rape.
Stories about divine conceptions and virgin births were fairly common in ancient times. They were created for kings and other famous men as a way to give them a semi-divine status. Examples include the pharaohs of Egypt, Alexander the Great, and a number of Roman emperors. Some scholars think that the story of Jesus' virgin birth developed as an imitation of similar stories about other famous men.
Note: There is a theoretical possibility that a woman could conceive a child while still a virgin. It could happen if an unfertilized egg began to multiply and develop into a fetus on its own. This would lead to a natural virgin birth. The scientific name for this process is parthenogenesis, and it has actually been observed in reptiles and fish. But a baby produced in this way will always be a female, because the egg wasn't fertilized. Therefore this couldn't be what happened In Mary's case. Instead, according to the gospels, she became pregnant through a divine act.
Note: For more information about this topic, go to this article on The Virgin Birth of Jesus