Barrow-wights are wraith-like creatures
Evil spirits of some kind (perverted Maiar or possibly spirits of Orcs, fallen Avari, or evil Men), they were sent to the Barrow-downs by the Witch-king of Angmar in order to prevent a resurrection of the destroyed Dúnedain kingdom of Cardolan.
During the War of the Ring, Frodo Baggins and company were trapped in the Barrow-downs, and nearly slain by wights. It has been speculated that Frodo was trapped in the cairn of the last prince of Cardolan.
Their nature and origins was unknown, however Tom Bombadil seemed to have complete authority over them. Probably his authority was sourced by the inherent power he had on this region of the world, not the spirits themselves.
Barrow refers to the burial mounds they inhabited and wight is an Old English word for "human being" or "person".
Due to its obscurity, there is a popular misunderstanding that "wight" means "spirit" or "ghost"; however it is cognate to modern German "Wicht", meaning "unpleasant person".
Due to the misunderstanding, many works of fantasy fiction, role-playing games and computer and video games use the term as the name of spectral creatures very similar to Tolkien's Barrow-wights; DnD has created a monster called "Wight", a kind of undead; the new terminology is also exemplified in A Song of Ice and Fire series by George R. R. Martin, book IV A Feast for Crows (2005). ("Who has been beyond the wall of death to see? Only the wights, and we know what they are like. We know.")
They were based on the Old Norse Draugr. Tolkien borrowed this concept from Norse mythology, e.g. Waking of Angantyr and Hrómundar saga Gripssonar.
Other versions of the legendarium
Due to his inspiration from Hrómundar saga Gripssonar, during the writing of The Lord of the Rings (see The History of The Lord of the Rings) Tolkien at first foresaw a link between the wights and the Ringwraiths, initially describing the Black Riders as horsed Wights, but the suggestion that they were the same kind of creatures was dropped in the published work. In the final work there remained a link between them: the wights were now spirits sent by the Witch-king.