In these verses, Jesus is warning his disciples about the persecution that they will face for following him. He tells them that they will be brought before councils, beaten in synagogues, and will stand trial before governors and kings because of their faith in him.
Jesus then reassures his disciples that when they are brought to trial, they should not worry about what to say or how to defend themselves because the Holy Spirit will speak through them. He tells them that this is an opportunity for them to bear witness to him and his gospel.
Jesus also predicts that family members will betray each other and that some of his followers will be put to death. However, he encourages them to endure to the end, promising that those who do will be saved.
In summary, this passage in Mark 13:9-13 is a warning to the disciples that persecution is coming, but that they should not fear because the Holy Spirit will guide them and they will be rewarded if they endure to the end.