Context: Following Jesus' instructions to His twelve apostles, Matthew 10:16–25 gives them direction for their future missionary journey. Jesus begins to outline the events that will occur after His own resurrection. The apostles will be arrested and hauled before various courts and officials. To avoid persecution, they will flee from town to town, proclaiming the gospel. Jesus will encourage these men to remain solid in their faith, just as He did at the Last Supper (John 16:25–33).
Message: Matthew 10:17–21: Jesus says that because of their association with Christ, these men will experience widespread, open hatred. This does not mean that Christians will be hated by literally every single non-believing person. It does mean that all kinds of people would hate the apostles.
In this passage, Jesus is describing how costly it will be for his chosen apostles to carry out His message. He says they will be arrested, flogged, and dragged before various courts. But if they endure to the end, they will enter immediately into salvation in His kingdom.
This verse is notable because it manages to be realistic while still giving people hope