A reliquary is a small box or recipient commonly used in the past to wear hanging from the neck. The very first use was entirely religious as a case to keep relics that once belonged to saints.
Withing Christianity a reliquary is the remains of a sanctified person and by extension a relic is a memory that belonged to them or to those who met the saint and reliquary is then the tiny recipient where it was kept.
There’s evidence of reliquaries already back in the 4th century. It was found in the Treasure of Monza, a gift that Saint Gregorio gave to the queen Teodolina.
Among that treasure there are several tiny bottles very common back in the time that only had cotton wet with blessed oil or that one inside the lamps close to the tomb of a martyr.
However, over the years the use was growing in popularity and the little reliquaries started containing the remains of a close familiar. When this happened people commonly kept hairs belonging to a loved one and the name evolved to “locket”, a piece which definition you can find here.