This will have to be a long answer - as it is a most important question.
By a miracle from God.
Some Christians and many ordinary folk doubt this fact - but if Jesus was an ordinary human, born normally, He could not possibly do the things that Jesus did! To the Christians who cannot accept that it happened, well to them I say "what else do you not accept, do you not believe them too?"
God could not be with an ordinary human in the same way He was with Jesus, i.e. no miracles or healing and no resurrection either.
God prophesied to Eve, that: "one of your seed, (offspring - a human being), will bruise Satan's head." (Genesis 3:15)
And 500 years before Jesus was born the Prophet Isaiah wrote: "Behold, a virgin shall conceive." and "For unto us a child is born, unto us a Son is given and the government shall be upon His shoulders. His name shall be called Wonderful Counsellor, The Mighty God, The Prince of Peace, the Everlasting Father and of His kingdom there shall be no end." (Isaiah 9:6)
Who else fits that role?
No ordinary person could - only Jesus could.
Further on, Isaiah wrote of the suffering and rejection of 'Him' and the words can only apply to the one who was crucified for us. This is all in Isaiah ch. 53
The Conception: Mary was engaged to Joseph when the Archangel Gabriel paid her a visit. Not many get a visit from him! Gabriel said: "Congratulations favoured lady, God is with you. You will have a child and you are to call him Jesus, for he will save the people from their sins." Mary said: "How can this be, for I am a virgin?" Gabriel went on: "The power of the Holy Spirit will overshadow you so that the child born to you will be utterly holy." Mary said: "I am the Lord's servant. I am willing to do what ever he wants."
So Jesus is actually God's Son and human in the same person.
When Joseph found out that she was pregnant, he did not report her (to have her stoned to death for adultery) but resolved to quietly divorce her. The Archangel Gabriel then appeared to him saying: "Do not be afraid to take Mary for your wife for she is with child from the Holy Spirit." Joseph agreed and Mary did have the baby Jesus. (Luke 1:26-39) Jesus was born in Bethlehem.
That location too was mentioned in prophecy, see Micah 5:2.
And 'wise men' from a long way away who knew about it, and came to 'see the new born king,' bringing gifts of gold, frankincense and myrrh (Matthew 2:9-12). So that is about how it happened. It requires faith to believe and enjoy the way God works out His purposes for all of us.