What exactly does "took her into his home" mean in the following passage?
John 19:26-27 (NIV) 26 When Jesus saw his mother there, and the disciple whom he loved standing nearby, he said to her, “Woman, here is your son,” 27 and to the disciple, “Here is your mother.” From that time on, this disciple took her into his home.
If it means that Mary came to live with John, why would this be allowed? Since Mary is married to Joseph? Did Joseph die somewhere down the line? Wouldn't it be frowned upon that a woman lives with a man who is not her husband? Why isn't Joseph mentioned, at all?
This is supplemental to @LanceRobert's answer (if Joseph was not dead, these points do not avail much).
Remember how much older than John Mary would have been. It has traditionally been held that John was a rather young disciple (note for example that he outruns flamboyant Peter; also a late date for the book of Revelation supports this idea if you subscribe to that). Jesus told him to take Mary in as his mother. Mary would have been in at least her mid forties at this time, but in my opinion at least fifty (33 years of Jesus' life + surely at least 12 years old when she conceived him—though I do not think there is warrant for believing she was that young.) Thus, I would expect that there would be less of a social stigma for her living with him, as it would have been fairly clear that she was not his girlfriend if she was at least twenty years older than him, and maybe more.
Jesus' death was extremely high-profile. Thus it would be easy to make the connection to why she would have moved in with John: her husband and firstborn both gone.
The last we hear of Joseph is in Luke 2 during the Jerusalem passover trip when Jesus was 12.
Luke 2:43 And when they had fulfilled the days, as they returned, the child Jesus tarried behind in Jerusalem; and Joseph and his mother knew not of it.
The consensus is that Joseph was long since dead by the time of Jesus' ministry. It would have probably been a good time after the Jerusalem trip, because Jesus had a number of brothers and sisters (Mark 6:3). Though since he was twelve at this point, they all could have been born by then.
Mark 6:3 Is not this the carpenter, the son of Mary, the brother of James, and Joses, and of Juda, and Simon? and are not his sisters here with us? And they were offended at him.
Another verse that verifies Jesus had brothers Gal 1:19:
Galatians 1:19 But other of the apostles saw I none, save James the Lord’s brother.
The fact that Mary was part of Jesus' retinue is a good indicator that Jesus was in the role of head of household and was taking care of her. This is also shown by his giving to John the responsibility to take care of the widow Mary (showing just how close John was to Jesus).
Mary obviously now a widow and Jesus now the head of the family, despite the pain that he is enduring, wants to take care of his mother. Mary’s other sons, the half-brothers of Jesus were still unbelievers, (John7:5 Mark6:3) so Jesus entrusts the care of his mother to an apostle, a man of faith, whom he loves. By doing so, he not only takes care of her physical and material needs but also her spiritual needs.
John was a very gracious Apostle. His Epistle clearly shows he was very gracious to women in "Beloved woman etc". He was also the first cousin of Jesus, being the son of Salome, the sister of Mary. Salome was alive and with Mary at the Cross. So Jesus was saying to his mother "Go and live with your sister and John, my beloved disciple, for whom I will provide and will be your provider. In this way you will know that I am still providing directly for you, as your faithful eldest son".
Jesus had four brothers, named in the Gospels, as Joseph, James, Judas and Simon. Why did He not give Mary to one of them, is the question. He also had an unknown number of surely married sisters as everyone was married then. The reason may be that their level of faith was the issue and Mary was very special.
I don't want to surmise without evidence but clearly Mary was very close to her sister, Salome, and her nephew John was a very special man, the only Apostle,as far as we know, faithful at the Cross and no doubt at that point, physically supporting his mother and aunt. The Cross was an experience that would have deeply bonded them. Clearly Jesus knew the whole story of the family, and his brother James did become a leader of the Jerusalem church and was martyred I think, but there is a suggestion that he was a trained priest.
Finally, maybe Mary just wanted to be with her sister and John and they were lovely faithful Christians, with a proven track record. She felt safe with them. John lived to a great age and possibly Mary did too, while many of the rest died violently quite young.