The Curse of Hatred (憎しみの呪い, Nikushimi no Noroi), is an ideal of enmity that was said to have been passed down throughout the generations by the Uchiha clan's forefather to the members of his lineage. The origins of this curse can be traced back to when a dying Sage of the Six Paths took the fateful decision to name his younger son, who would go on to become the forefather of the Senju clan, his successor instead of the older sibling because the Sage believed that the beliefs held by the younger son were the key to peace. Consumed with hatred, the elder brother eventually waged war against his brother and thus began a cycle of hatred that transcended history, culminating in the mutual hostility between the Uchiha and Senju.
As Tobirama Senju revealed, the Uchiha treasured love and friendship even more than their own clan, yet it was their ultimate downfall. Because this is a part of them they regularly conceal, an Uchiha's love turns into hatred the moment they lose the ones they hold dear. This despair-filled experience would cause a manifestation of special chakra within the Uchiha's brain, affecting the optic nerves and creating the Sharingan, "the eye that reflects feelings". Even the ways for Sharingan to evolve further into Mangekyō Sharingan and Eternal Mangekyō Sharingan require an extremely painful experience that would drive the user into even deeper darkness that would utterly consume them. Such a ninja at the time was Madara Uchiha, who refused to relinquish his hatred after being forced to take his beloved brother's eyes to obtain the Eternal Mangekyō Sharingan prior to Konoha's founding. Uneasy of how long the Uchiha's standing in the village would last once Tobirama Senju became Hokage, Madara sowed the seeds of contempt among his kin with the promise that they would eventually lose standing in their partnership with the Senju if they did not help him.
As an Uchiha is plunged deeper into the darkness, even the slightest hint or mention of anything even remotely connected to the person whose death caused them to end up like this will cause them to become extremely angry as seen in Madara and Sasuke's case. Also, the Uchiha can't be reasoned with anyone except the person who caused them to be like this, if the person can be reincarnated. Only that person has any chance of saving the Uchiha from the curse as seen in Sasuke's case.
Though Madara was exiled by his clan soon after, a few Uchiha would begin to believe his warning generations later, yet they were no longer in a position of power to do anything about it due to Tobirama's attempt to thwart the curse by placing the Uchiha in the Konoha Military Police Force to regulate their emotions. The Uchiha's curse was fully rekindled later as the result of Obito Uchiha witnessing the death of Rin Nohara, in turn causing the Nine-Tails' Attack on Konoha which resulted in the Uchiha plotting to take over Konoha after being unjustly accused for the event. This led to the Uchiha Clan Massacre executed by Itachi Uchiha, with Sasuke Uchiha's quest for avenging his family resorting in becoming what Obito noted as the sole inheritor of the Uchiha Clan's hatred and thus fated to clash against Naruto Uzumaki, who has inherited the Senju's Will of Fire. However, questioning his resolve, Sasuke has Orochimaru reincarnate the Hokage and learns the full nature of the Curse of Hatred from Tobirama. Having also learned from the past Hokage about the origins of Konohagakure, Sasuke choose to protect the village, and his brother's sacrifice instead of destroying it.
However, throughout generations there were Uchiha who were able to transcend the limitations of the limiting mentality of thinking only of their clan and place the village's well-being above all else. Uchiha such as Kagami — a subordinate of the Second Hokage, his son Shisui, and Shisui's best friend, Itachi all inherited the village's will and looked out for its well-being.