The famous proverb "a house divided against itself cannot stand" is found in each of the Synoptic Gospels (Matthew 12:22–32; Luke 11:14–23; Mark 3:22–29). In Mark 3, the scribes were accusing Jesus of being possessed by Beelzebul, that is, Satan. They said "by the prince of demons he casts out the demons" (Mark 3:22). That is when Jesus responded by saying "How can Satan cast out Satan? If a kingdom is divided against itself, that kingdom cannot stand. And if a house is divided against itself, that house will not be able to stand" (Mark 3:23–25).
Jesus was saying, essentially, that it is impossible for Satan to cast himself out. He was pointing out that Satan's goal is to destroy, not to heal; Satan would not cast demons out of a person in order to promote Jesus, the Son of God, as a powerful and merciful savior and healer. It makes no sense at all for Satan to do this.
The "house" in the parable really means a "household" or a family living together beneath one roof. Just like a kingdom in civil war will eventually destroy itself, a household that is "divided against itself" will eventually fall. If there is no harmony and agreement between members of a household, it is impossible for that house to "stand" and be successful. For example, imagine a family with four children. The father and two of the children insist on going out to dinner, as a family. The mother and the other two children insist on staying home and having dinner, as a family. They want to eat together, but cannot agree on location. How soon do you think this family will accomplish its goal? This is a picture of a household divided against itself: it will never accomplish its aim unless everyone is working in accord. The aim of Satan is to destroy God's kingdom, to obscure truth, to kill and steal and devour (John 10:10; 1 Peter 5:8). How successful would he be if he went around helping Jesus cast out demons?
When Jesus told the scribes that "a house divided against itself cannot stand" he was exposing their stubborn unbelief. It is obvious that Satan doesn't cast out demons; the scribes and Pharisees were just trying to find reasons to hate and oppose Jesus because He posed a threat to their religious system. They depended on their own efforts for salvation, and for that reason, Jesus' message of dependence on God was odious to them. They were trying to find anything—even the ridiculous—that would prove them right and Jesus wrong.
At one point, Jesus told the Pharisees that they could be free of the practice of sin (John 8:34). They were known as the most righteous people around—and Jesus was telling them they were sinners? They didn't like that! They threw the virgin birth in Jesus' face, and accused His mother, Mary, of being sexual immoral, saying "We were not born of sexual immorality" and implying that God was their Father but not Jesus' Father, as Jesus claimed (John 8:41). Jesus told them then, point blank: "You are of your father the devil" and the proof was in their murderous intentions and their lies (John 8:44). Again, they accused Him of having a demon (John 8:48). Jesus responded by telling them "before Abraham was, I am" which is the equivalent of saying "I am Yahweh." The Pharisees understood His meaning. They picked up stones and tried to stone Him, but Jesus "hid himself" (John 8:49–59).
This fascinating passage further proves that the Pharisees were desperate to silence Jesus at any cost. They became irrational, liars, and were ready to murder Him. They were indeed exhibiting the works of Satan, while Jesus exhibited the works of God. It seems that Satan was working with them to oppose Jesus by having them accuse Jesus of being possessed. This is consistent with the deceptive nature of Satan, who "disguises himself as an angel of light" (2 Corinthians 11:14) and evidence that what Jesus said was true: Satan does not oppose himself, he opposes God and Christ.