Roughly: Thingol was a great Elven-king, and had dealings with the Dwarves. The Dwarves made a really spiffy necklace, the Necklace of the Dwarves (it has a name, too, but I don’t recall it), which was generally considered the most beautiful thing ever made by any non-Elf. The Dwarves sold it to Thingol on a sort of installment plan.
Meanwhile, Thingol managed to get ahold of one of the Silmarils (the details are long and too good to spoil here: Suffice to say that a Silmaril was considered cheap, for the price he paid). The three Silmarils are universally reckoned to be the fairest of all works of hands, ever, and Thingol (or one of the Elvish smiths working for him, I don’t recall) got the bright idea to combine the greatest works of Elf and Dwarf, and re-worked the Necklace to incorporate the Silmaril into it as a centerpiece. Now, ordinarily, this probably would have been a good idea, and might have strengthened the friendship between Elves and Dwarves. But then Thingol got the idea into his head that, since the Elves had incorporated something so great into the Necklace, it was now partly an Elvish creation, so he didn’t need to pay for it any more. The dwarves said that if he wasn’t going to pay for it, they’d be glad to take the Necklace back… but with the Silmaril still in it.
So now, instead of the Elves claiming the Silmaril and the Dwarves claiming the Necklace, we have both groups claiming both items (the Silmarils seem to have a tendancy to encourage this sort of thing). The predictable result was war, and both sides suffered greatly: Thingol’s kingdom was destroyed and his people scattered, and most of the dwarves of that nation were killed. This was the start of the animosity between the two peoples.
Since then, relations between dwarves and elves have had ups and downs: I believe that the Khazad Dum - Hollin alliance came significantly after that first Dwarf-Elf falling out, and it’s implied that the friendship of Legolas and Gimli led to another period of good relations.