The relationship between the hybrid doppelgänger, Katherine Pierce, the vampire Damon Salvatore, and the cured vampire/deceased doppelgänger, Stefan Salvatore started at some point in 1864 when Katherine came to Mystic Falls in order to hide from Klaus and met the Salvatore brothers. She had a romantic relationship with both, although she had a clear preference for Stefan and would later reveal, in recent times, that she never loved Damon and that it was always Stefan.
Katherine had planned to turn both brothers into vampires, and had been feeding them vampire blood for a while already when her identity was revealed and they were both killed by their own father for trying to protect her. However, Damon truly loved her and had hoped to be the only one to be turned into a vampire by her, so he was angry at his brother for being turned into one as well. Furthermore, Damon had been told by Emily Bennett that Katherine had been entombed along with all the other vampires in the town in 1864 as a form of protection, and so, for over 140 years, he dreamed of bringing Katherine back as he shared a bitter and violent relationship with his brother.