A child is usually given one name at birth and another shortly thereafter. The birth-name is called the amilessë, because the mother has a swell of foresight that tends to make the name something like a prophecy. Soon after the birth, there is a ceremony called the Essecarmë or "Name-making", where the father announces the child's ataressë, or the name they will more likely use in day-to-day interactions.
There is also a ceremony called the Essecilmë or "Name-choosing", where an Elf may create their own name, which is called an epessë. Names may also be given later as epithets, such as Gil-galad. These names are often used in conjunction with given ones.
As an example, let's use Maedhros son of Fëanor.
His amilessë is Maitimo, referring to the fact that he would grow up to be quite handsome.
His ataressë is Nelyafinwë, referring to his place in the Ñoldorin line of succession (and also a veiled insult from his father to his father's (half-)brother).
He also has two common epessi: Russandol and Maedhros. Russandol was given to him by his brothers and other family because of his red hair (sort of like nicknaming a ginger family member "carrot-top"). Maedhros was used after he travelled to Middle-earth, as it is a Sindarin combination of Maitimo and Russandol
. Some people headcanon that he chose this name for himself due to its unusual formation, as opposed to simply being given a transcription by the Sindar (like his brothers).
Note that these are all Quenya/Ñoldorin traditions, and things may have been different outside of Valinor.