On this occasion, Jesus was inside a house, probably at Capernaum. Due to the great crowd that had gathered, His flesh-and-blood family members were not able to get close enough to speak with Him (Luke 8:19). We learn from Matthew 13:55 that Jesus had four half-brothers. These were other sons of Mary who presumably had Joseph as their actual father.
It is not explained why His mother and brothers wanted to speak with Him, but earlier in the context of that day (cf. Mark 3:21) it was noted - "His own people heard about this, they went out to lay hold of Him, for they said, 'He is out of His mind.'" It is possible that "His own people" is a reference to Jesus' mother and brothers. It appears their primary purpose wasn't to speak with Jesus, but to remove Him from what they perceived to be a dangerous situation (cf. Mark 3:20). Jesus' family came together in a group, perhaps hoping they would be able to control Him. However, when they arrived at the scene, they were not able to get close enough to Him, so they must first send Him a message.
The actions of Jesus' half-brothers are not surprising since they were unbelievers at that time (John 7:5). They certainly feared for His safety and probably thought removing Him from the situation would be the best thing to do. However, one might wonder why Mary, who had the benefit of several revelations regarding her Son, would think Jesus to be "out of His mind." Perhaps she too was moved by fear for Jesus' safety and felt her other sons were doing the right thing.
The people of the crowd communicate to Jesus that His family wants to speak with Him. However, since Jesus was still speaking (cf. Matt. 12:46), this message was an interruption. For Jesus' family to interrupt Him implies that they felt their business with Him was more urgent than His business with the people. They believed their mission was more important than His was (cf. Luke 19:10)! Certainly they deserved the response Jesus would give them!
The Lord asked the crowd in Matthew 12:48 -"Who is My mother and who are My brothers?" It is certainly not the case that Jesus had forgotten about His physical family. He merely used this interruption as an opportunity to teach an important lesson.
He then referred to His disciples as His "mother" and "brothers." He explained further in verse 50 - "For whoever does the will of My Father in heaven is My brother and sister and mother." In other words, those who do the will of God are members of Jesus' spiritual family. It is taught elsewhere that those who do God's will are those who will be saved (Matt. 7:21-23). What can be deduced, therefore? To be a member of Jesus' spiritual family is to be saved (cf. John 3:3-5; Gal. 3:26-29)! Clearly, Jesus values spiritual relationships over physical ones. Our Lord is more closely related to others who do the Father's will than He is to those who may be related to Him physically. True kinship is enjoyed with those who share common ideals and goals. This is not to say that one should not provide for the needs of his physical family (cf. I Tim. 5:8), but to place more emphasis on physical relationships than spiritual ones is a grave mistake--in fact, it is a sin (Matt. 10:37; Luke 14:26; cf. Gal. 6:10).