The text on this is extremely terse, which is common to the Biblical style. In fact, it takes a mere two sentences in the text. Kings 2 Chapter 2 v. 23-24. To quote in full:
23. And he [Elisha] went up from thence unto Beth-el; and as he was going up by the way, there came forth children* out of the city, and mocked him, and said unto him: 'Go up, thou baldhead; go up, thou baldhead.' 24. And he [Elisha] looked behind him and saw them, and cursed them in the name of the LORD. And there came forth two she-bears out of the wood, and tore forty and two children of them.
*the Hebrew word "Na'arim" (singular=na'ar) is hard to translate to get the right connotation wrt age. It can mean anything from young children to early teenage years (e.g., Gen. 21:12, where the teenage Ishamel is refered to as a "na'ar).
That seems rather grusome and disproportionate, especiall when view as a pure translation without either textual or cultural context. Below, I give an explanation that ties into the idea of the season of repentance and understanding that our ungaurded speech, even when provoked, may unintentionally cause others terrible harm. Hence we must work to control our temper, gaurd our conduct and our speech, and always bear in mind the potential unintended harm we may do if we act in careless anger.
First, we must understand the textual context of this story. Chapter 2 of Kings 2 relates how the prophet Elijah departs the Earth and leaves his disciple, Elisha, as his successor. (Even this short contextual briefing misses a lot of what is going on here, but this is not the time to go into the full story of Elijah and the symbolism around his life.) To relate in brief, Elijah gets word from God it's time to go. Elijah tells Elisha to stay home, but Elisha refuses to part from him. As they journey to the place God is sending Elijah, they come to various cities where Elisha is met by members of "the sons of the prophets" (lit. b';nei haniviim. This group is referred to in several of the prophetic books and appears to have been a mystic school whose practitioners would receive lesser forms of Divine inspiration than the individually named prophets.) All of them repeat the same message: "Know you that the Lord shall take away your master from being in charge of you (lit, from off your head) this day?" Elisha answers every time: "I know, therefore keep silent."
Elijah and Elisha finally come to the river Jordan. Elijah takes off his cloak, hits the river with it, and the river splits in two allowing them to cross on dry ground. Elijah then asks Elisha: "So what can I do for you before I go." Eliisha responds: "Give me a double portion of your spirit." Eliah answers: "You have asked a hard thing. If you see the manner of my departure, then it shall be so. But if you do not see, then it shall not be so." At that point, along comes a firery chariot drawn by horses of flame. Elijah hops on, and in doing so his cloak slips to the ground.
Elisha see the whole thing. He collapses in weeping and tears his clothes in half in mourning. He then picks up the cloak of Elijah and puts it on. He returns the way he came. When Elisha comes to river Jordan, he takes the cloak and hits the water just as Elijah had done on the way out. And, as with Elijah, the Jordan splits. Elisha returns to Jericho. The sons of the prophets want to go looking for Elijah's body, thinking God will have cast the body down to Earth. Elisha tells them not to go. But they harrangue him "until he is embarrased by them" and finally says "send [your search party]." Surprise! They find nothing. Elisha tells them "did I not tell you 'don't go?'"
At this point, the elders of the city explain they have a problem with the local spring, which has turned bitter. Elisha asks them to bring him some salt. He tosses the salt in and the water is purified "according to the words of Elisha, which he spoke" (we'll get back to that).
Elisha leaves, retracing his steps back to the north of Israel, at which point the incident with the bears occurs.
How The Power Of "Elijah's Spirit" Works
Another important element of this to understand is how the power of "Elijah's Spirit," which Elisha has now inheritted a double portion, works. Unlike other prophets, who only perform miracles and issue prophecies that God commands, Elijah is a "kani," a religious zealot. God has given him a unique power to make things happen. We see this from the beginning, when Elijah starts his prophetic mission by simply walking up to King Ahab and saying "No more rain or dew until I say otherwise!" (Kings 1 17:1) Consistently, Elijah simply does stuff on his own initiative in accordance with how he sees his mission, and God makes it happen. We do not get any indication whether God actually approves of what Elijah does. Indeed, from what God does after Elijah declares the drought, there is some indication that God is not entirely happy with Elijah. But God (for whatever reason) has delegated to Elijah the power to "make things happen by saying them." When Elisha inherits a double portion of "Elijah's spirit," it is clear from the miracles that follow in the text (and a number of subsequent ones) that Elisha has the same "Super power." If Elisha says something is gonna happen, God makes it happen.
But this power also has conequences.
Looking at the Bears With This In Mind.
So getting back to the bears. I think we would all agree that Elisha has had rather a difficult time of things in the few days leading up to the incident in question. It is therefore not unsurprising that Elisha loses his temper when confronted by a gang of kids taunting him for being bald. Also note that Elisha does not wish an specific bad thing to happen to them. Rather, as the text explains Elisha "cursed them in the name of God." It's not like Elisha says "God, please send some bears to eat these kids." Rather, in a fit of temper, Elisha says "God should curse you little hooligans" or some such generic anger.
But Elisha isn't just anyone. He has "a double portion" of the Spirit of Elijah. That's power. Elisha's angry, careless words trigger an immediate result. God responds to the curse by sending a bunch of bears out to kill 42 children. It does not matter that Elisha did not specifically request this to happen,and there is no indication that Elisha intended for his curse to be anything other than the angry shout of an emotionally distraught man at his unexpected and unwarranted tormentors. And most of us, I think, would agree that if Elisha had been an ordinary bald guy who just lost his mentor, and a gang of kids came out and started harassing and insulting him, that he would be totally justified in being pissed off and cursing them out (in the non-magic way). It is only because Elisha has newly come into magical powers that his angry response has such powerful repercussions.
Applying This To Ourselves.
After the incident with the bears, Elisha goes to Mount Carmel. Mount Carmel was where Elijah challenged the priest of Ba'al to a magic sacrifice duel. It was the place of Elijah's greatest triumph, where at last the assembled people recognized that God was the one true God and proclaimed -- "The Lord is God! The Lord is God!" (and then they slew the priests of Ba'al.) But Elijah's victory was short lived. Almost immediately, Queen Jezebel utterly reversed his victory with her own prononcement. The people returned to their idolatry, and Elijah lost all hope of achieving the Divine Mission and longed to die.
Elisha meditates on the meaning of power -- particularly the power of speech. In the span of a few short days of losing his mentor and becoming his successor, Elisha learns that he can use his power to rebuke. He can use his power to heal. His power can have terrible unintended consequences when used carelessly. But even when used in direct confrontation for a just and holy cause, as his master Elijah had done, a victory by overwhelming force does not truly persuade or convince.
Like Elisha, God has given us power to the affect the world for both good and bad. We can use this power to help others, as Elisha does when the spring is purified "according to the word of Elisha, which he spoke." But at the same time, we can also do terrible things even if we don't mean to do them. We can use our power to try to bully or over awe others into doing what we want. But even when what we want for them is something genuinely good and not merely something selfish -- as was the case with Elijah at Mt Carmel -- coercion does not truly make people change.
Perhaps even more important, this power comes from something as simple as our power of speech.
We can use our power of speech in a careful, deliberate way to help others -- as Elisha did with the spring. We can also use our words carefully to rebuke others when warranted without doing harm -- as Elisha did when he rebuked the sons of the prophets for insisting on searching for Elijah's body because they refused to believe that Elijah was taken bodily into Heaven. But when we are careless with our words, even when our anger is justified, we can do incredible harm to people. It does not matter that we don't intend the harm. It doesn't matter that we have no idea we are even that powerful. Whether we like it or not, whether we even realize it or not, our words have profound impact on others. We can use the power of our speech to try to push and coerce people -- and we may even succeed in the short term. But we must recognize that verbal coercion is not the same as educating them or helping them.
In our age of social media in particular, we can see again the power of speech. We can use social media to help people. We can use it to make people feel miserable, calling forth with our words mobs of Internet trolls to rend people apart (whether we mean to summon a mob or not, our words have power). We can use social media to try to educate or even to rebuke in a useful way. And we can use social media to try to coerce others to do what we think is right -- whether they actually agree with us or not. We are all potentially Elijah on Mt Carmel, or Elisha purifying the spring of Jericho. But we are all also, if we do not use our power wisely, Elisha and the bears.