Everything we know about St. Joseph, the husband of Mary and the foster father of Jesus, comes from the Bible, and mentions of him are underwhelming. The 13 New Testament books written by Paul (the epistles) make no reference to him at all, nor does the Gospel of Mark, the first of the Gospels. Joseph first appears in the Bible in the gospels of Matthew and Luke, one of which (Matthew) traces Joseph’s lineage back to King David.
After marrying Mary, Joseph found that she was already pregnant, and being “a just man and unwilling to put her to shame” (Matt. 1:19), he decided to divorce her quietly, knowing that if he did so publicly, she could be stoned to death. An angel, however, came to Joseph and told him that the child Mary carried was the son of God and was conceived by the Holy Spirit, so Joseph kept Mary as his wife.
After Jesus’s birth in Bethlehem, an angel came to Joseph again, this time to warn him and Mary about King Herod of Judaea and the violence he would bring down upon the child. Joseph then fled to Egypt with Mary and Jesus, and the angel appeared again, telling Joseph that Herod had died and instructing him to return to the Holy Land.