Together with Ungoliant, Melkor destroyed the Two Trees. The Silmarils now contained all the remaining light of the Two Trees. Therefore the Valar entreated Fëanor to give up the Silmarils so they could restore the Trees, but he refused. Then news came: Melkor had killed Fëanor's father Finwë, the High King of the Ñoldor, and stolen all the gems, including the Silmarils. After this deed Melkor fled to the northlands of Middle-earth, where his ancient fortresses were. Melkor, now named Morgoth by Fëanor, set the Silmarils in his crown.
Fëanor was furious at Melkor and at the Valar's perceived desire to take the gems for their own purposes, and, swearing that he and his sons would not rest until the Silmarils were recovered, he led the Ñoldor back to Middle-earth. His flight, which began the First Age of Middle-earth, led to no end of grief for the Elves and eventually for the Men of Middle-earth. Five major battles were fought in Beleriand, but ultimately the Ñoldor failed.
One of the Silmarils was recovered by Beren and Lúthien through great peril and loss. This stone was later taken by Eärendil to the Valar in the West as a token of repentance. The Valar then set this Silmaril as a star. The other two gems remained in Morgoth's hands, and were taken from him only at the end of the War of Wrath. However, soon afterwards, they were stolen by Fëanor's two sons Maedhros and Maglor. The jewels burned their hands, in refusal of their rights of possession, as they had burned Morgoth's hands many years before. In agony, Maedhros threw himself and his Silmaril into a fiery pit, and Maglor threw his into the sea. Thus the Silmarils remained in all three elements of Arda -- in the sky, soil and water.
In most versions of the texts, following Melkor's final return and defeat in the Dagor Dagorath (Battle of Battles), the world will be changed and the Three Silmarils will be recovered by the Valar, and Yavanna will break them and with their light she will revive the Two Trees, the Pelóri Mountains will be flattened and the light of the Two Trees will fill Arda again in a new age of eternal bliss.
See also The Silmarillion, the book which tells the story of the Silmarilli.