Let us look at 2 parallel passages:
Mark 3:20
And He *came home, and the crowd *gathered again, to such an extent that they could not even eat a meal. 21 When His own people heard of this, they went out to take custody of Him; for they were saying, “He has lost His senses.” 22 The scribes who came down from Jerusalem were saying, “He is possessed by Beelzebul,” and “He casts out the demons by the ruler of the demons.” 23 And He called them to Himself and began speaking to them in parables, “How can Satan cast out Satan? 24 If a kingdom is divided against itself, that kingdom cannot stand. 25 If a house is divided against itself, that house will not be able to stand. 26 If Satan has risen up against himself and is divided, he cannot stand, but he is finished! 27 But no one can enter the strong man’s house and plunder his property unless he first binds the strong man, and then he will plunder his house.
28 “Truly I say to you, all sins shall be forgiven the sons of men, and whatever blasphemies they utter; 29 but whoever blasphemes against the Holy Spirit never has forgiveness, but is guilty of an eternal sin”— 30 because they were saying, “He has an unclean spirit.”
Luke 11:14
And He was casting out a demon, and it was mute; when the demon had gone out, the mute man spoke; and the crowds were amazed. 15 But some of them said, “He casts out demons by Beelzebul, the ruler of the demons.”
Luke 12:8
“And I say to you, everyone who confesses Me before men, the Son of Man will confess him also before the angels of God; 9 but he who denies Me before men will be denied before the angels of God. 10 And everyone who speaks a word against the Son of Man, it will be forgiven him; but he who blasphemes against the Holy Spirit, it will not be forgiven him. 11 When they bring you before the synagogues and the rulers and the authorities, do not worry about how or what you are to speak in your defense, or what you are to say; 12 for the Holy Spirit will teach you in that very hour what you ought to say.”
...
17 But He knew their thoughts and said to them, “Any kingdom divided against itself is laid waste; and a house divided against itself falls. 18 If Satan also is divided against himself, how will his kingdom stand? For you say that I cast out demons by Beelzebul. 19 And if I by Beelzebul cast out demons, by whom do your sons cast them out? So they will be your judges. 20 But if I cast out demons by the finger of God, then the kingdom of God has come upon you.
The common theme that our Lord was warning against was clearly this: The Pharisees all knew that He could only cast out demons by the Holy Spirit of God. After all, they also knew how to remove demons. (Luke 11.20) But instead of acknowledging that fact, they chose to call the supernatural work of the Holy Spirit the work of the devil.
So as far as I can tell from these texts, the only way to commit this sin is to see a miracle, know it is God at work; but blame the devil for it in order to keep people away from the Gospel.
BTW - Beelzebul means "lord of the flies."