When she married Joseph, Mary was pregnant with Jesus by someone else. Rumor had it that the father was a Roman soldier called Pantera, but the rape (or affair) was covered up. Joseph originally intended to divorce her (Matthew 1: 19), but changed his mind and left Galilee to go back to his family in Judea for Mary to have the child.
The couple subsequently had several more children. In his 30s Jesus preached in his hometown of Nazareth, and people dismissed his claims to authority, saying “Isn’t this the carpenter’s son? Isn’t his mother’s name Mary, and aren’t his brothers James, Joseph, Simon and Judas?
Aren’t all his sisters with us?” (Matthew 13: 55-56). None of Jesus’ half-brothers should be confused with other followers of his with those names, other than James who became the leader of the disciples in Jerusalem some time after Jesus’ execution.
Some Christians deny that “brothers” and “sisters” means that they were Mary’s children – though clearly from the context it’s a nuclear family. Catholic and Orthodox Christians, especially, profess the perpetual virginity of Mary, and have created a backstory of Joseph having had an earlier marriage to a woman named Salome. She died, leaving Joseph with half a dozen children for him to raise. You have to wonder why the older kids are never part of the creche scenes of the baby Jesus in the manger… Mary, Joseph, Kings, Angels, Shepherds, farm animals… but no brothers and sisters?
No, Jesus had at least six siblings, and they were all younger.