There are many theories as to what the unforgivable sin might be. Personally, like many here I believe it has to do with blaspheming the Holy Spirit or attributing things that God has done to Satan. Notice what is said in Mark 3:22–30:
"22 And the scribes who came down from Jerusalem were saying, “He is possessed by Beelzebul,” and “by the prince of demons he casts out the demons.” 23 And he called them to him and said to them in parables, “How can Satan cast out Satan? 24 If a kingdom is divided against itself, that kingdom cannot stand. 25 And if a house is divided against itself, that house will not be able to stand. 26 And if Satan has risen up against himself and is divided, he cannot stand, but is coming to an end. 27 But no one can enter a strong man’s house and plunder his goods, unless he first binds the strong man. Then indeed he may plunder his house.
28 “Truly, I say to you, all sins will be forgiven the children of man, and whatever blasphemies they utter, 29 but whoever blasphemes against the Holy Spirit never has forgiveness, but is guilty of an eternal sin”— 30 for they were saying, “He has an unclean spirit.”"
Mark tell us precisely why he told them this, "for they were saying, He has an unclean spirit." So therefore, blaspheming or attributing things that were factually done by God to Satan or evil entities is can be considered to be the unforgivable sin. Jesus doesn't really make it crystal clear I believe he could have been giving them a warning. "Hey you're getting dangerously close to doing this sin, be careful now".
The ambiguity of what exactly is the unforgivable sin is why there are so many theories of what it might. For example, in the Didache they had the understanding the unforgivable sin also extends to speaking against a prophet that is speaking in the spirit
"3 In regard to ‘apostles’ and ‘prophets,’ act according to the doctrine of the Gospel. 4 Let every apostle who comes to you be received as the Lord. 5 But he shall not remain more than one day. But, if necessary, let him remain a second day. But, if he stays for three, he is a false prophet. 6 And when the apostle departs, let him take only enough bread to last until he reaches shelter; but, if he asks for money, he is a false prophet.
7
And you shall not tempt any prophet who speaks in the spirit, or judge him; for every sin shall be forgiven, but this sin shall not be forgiven. 8 But not everyone who speaks in the spirit is a prophet, but only if he follows the conduct of the Lord. Accordingly, from their conduct the false prophet and the true prophet will be known. 9 No prophet who in the spirit orders a meal to be prepared eats of it; but, if he does, he is a false prophet"
Didache 11.3–9
Glimm, F. X. (1947).
The Didache or Teaching of the Twelve Apostles. In F. X. Glimm, J. M.-F. Marique, & G. G. Walsh (Trans.),
The Apostolic Fathers (Vol. 1, pp. 180–181). Washington, DC: The Catholic University of America Press.
You have other different options such as
Now the man who, not believing that sins are remitted in the Church, despises this great gift of God’s mercy, and persists to the last day of his life in his obstinacy of heart, is guilty of the unpardonable sin against the Holy Ghost, in whom Christ forgives sins. But this difficult question I have discussed as clearly as I could in a book devoted exclusively to this one point.
Augustine of Hippo. (1887).
The Enchiridion. In P. Schaff (Ed.), J. F. Shaw (Trans.),
St. Augustin: On the Holy Trinity, Doctrinal Treatises, Moral Treatises (Vol. 3, p. 264). Buffalo, NY: Christian Literature Company.