Among the various things students at The Hogwarts School of Witchcraft and Wizardry come across is a variety of magic spells. The line between different kinds of spells used in the Potter books is sometimes a bit blurry, but basically, a good kind of spell is called a “charm”, while the really bad ones are called “curses”. A jinx is milder than a curse – causing some trouble, but no lasting bodily harm. Jinxes are sometimes used for practical jokes, sometimes defensively to prevent something more serious. (If you happen to be reading this post without having read the books, I should perhaps point out that “the Dark Arts” are not taught at Hogwarts; but “Defense Against the Dark Arts” is.)
The etymology (origin) of the word jinx is obscure. In folklore too it is connected to minor misfortunes and bad luck. One theory is that it may come from the Latin name iynx, for a kind of small woodpecker. In English it is called wryneck, from the ability to turn its head almost 180 degrees. When disturbed at the nest, this bird twists and turns its head in a snakelike way, also making a hissing sound. This odd behaviour led to it being connected with witchcraft.