Hot hands refers to the idea that a player who has scored a basket (therefore, has "hot hands") is more likely to score the next basket.
It is suggested that this is a fallacy because apparently scoring is considered a random event (as far as I understand it). It is the equivalent of flipping coins. And just as when you flip coins, you might get three heads in a row by chance, the same applies to scoring in basketball. So players probably remember those sequences when they scores several baskets in a row and think it had something to do with them.
Now I can not shake the feeling that this explanation is incomplete. Let me compare scoring with my efforts to learn probability on my own, which I have been doing for a while.
When I get some question right, I become more energized and confident, and am more likely to work on the following question because I feel more hopeful that I will figure it out.
But when I try several probability questions and get them all wrong, I am quite unlikely to try my best on the next one. I have sometimes later returned to questions that I had failed at, noting that they were quite easy but that earlier I had simply lost the will to put in any effort.
Anyhow, so to go back to the basketball example, why is each shot is assumed to be completely independent of the previous shots. Why doesn't a player's effort or confidence level is irrelevant? I can imagine hot hands applying to someone blindingly throwing the ball and once in a while getting lucky, but the same thing applies to professional players even? Yes, the ball has no memory but the person throwing the ball does. No?
The Hot Hand is no longer considered a fallacy. There's a growing body of evidence to show that it is indeed real. Furthermore, there was a mathematical mistake in the original 1985 paper that, when corrected for, actually supported the existence of a hot hand.
This is known as the Hot Hand Fallacy Fallacy.
This blog article explains the original paper's mistake. I'll do my best to summarize:
Crazy right? But it's true. The mistake is that when you get many successes (heads, in the case of the blog) in a row, you get a very high proportion, but it misses the fact that it should be "more important" than other samples.
(Using the example from the blog article, HHH is counted as having a proportion of 1, which is the same weight it gives to the sequence THH. But this is wrong because HHH should really be counted as 2/2 while THH should be counted as 1/1.)
There's also some good stuff in vadim's link in the comments: https://en.wikipedia.org/wiki/Hot_hand#Recent_research_in_support_of_hot_hand
Now there's some pretty plausible reasons why the hot hand exists (like you said, one could get more energized and confident), but I don't think much research has been done so far as to WHY it exists, only that it does...