They can't die by age, but they can die by the sword or grief.
According to Tolkien, once an Elf becomes an adult, they stop getting older. They are also less vulnerable against physical damage, but they aren't immortal. The lives of Elves only endure as the world endures.
Elves could be slain or die of grief (their spirit leaves their body), but were not subject to age or disease.
When an Elf dies, his spirit goes to Mandos for his judgement, and after a period of waiting could be reembodied.
According to Wikipedia
Elves are naturally immortal, and remain unwearied with age. In
addition to their immortality, Elves can recover from wounds which
would normally kill a mortal Man. However, Elves can be slain, or die
of grief and weariness.
Spirits of dead Elves go to the Halls of Mandos in Valinor. After a
certain period of time and rest that serves as "cleansing", their
spirits are clothed in bodies identical to their old ones.
However, they almost never go back to Middle-earth and remain in
Valinor instead. An exception was Glorfindel in The Lord of the Rings;
as shown in later books, Tolkien decided he was a "reborn" hero from
The Silmarillion rather than an individual with the same name. A rare
and more unusual example of an Elf coming back from the Halls of
Mandos is found in the tale of Beren and Lúthien, as Lúthien was the
other Elf to be sent back to Middle-earth – as a mortal, however.
Tolkien's Elvish words for "spirit" and "body" were fëa (plural fëar)
and hröa (plural hröar) respectively.
Interesting info from here
While the three cycles are not specifically defined, the first cycle
is likely childhood and adolescence, which ended at the 100th year,
the second is adulthood which could continue for Ages, and the third
is for extremely old Elves;
Elves did not physically age after they reached maturity, but they did
age in a different sense than Men. They became ever more weary of the
world and burdened by its sorrows.
Elves are naturally immortal; like the Ainur, they are bound to Arda
until its End. Elves are immune to all diseases, and they can recover
from wounds which would normally kill a mortal Man.
The only "unkillable beings" in LOTR are the soldiers of The Army of the Dead. The Army of the Dead was cursed by Isildur with immortality in the form of an existence as undead skeletons after they abandoned their oath in the War of the Last Alliance. Their only chance of dying was to fulfill their oath.