“But while he thought about these things behold, an angel of the Lord appeared to him in a dream saying ‘Joseph, the son of David, do not be afraid to take to you Mary, your wife, for that which is conceived in her is of the Holy Spirit. And she will bring forth a son, and you shall call his name Jesus.” –Matthew 1:20-21
“And did not know her till she had brought forth her first born son. And he called his name Jesus.”–Matthew 1:25
Joseph was Mary’s husband, but the Holy Spirit (God) was Jesus’s father. Mary proceeded to have other children after Jesus, because Joseph was told to wait till Jesus was born before he knew her. She was only the “Virgin Mary” before and while she was pregnant with Jesus.