For a character to be protected by copyright, it must be an original creation. Tolkien never had a copyright on elves or orcs, because both of those creatures existed in literature prior to The Lord of the Rings. On the other hand, Hobbits were an original creation, so the use of a Hobbit character would require a license from the Tolkien estate. That's why Dungeons and Dragons, for example, refers to Hobbit-like creatures as "Halflings".
Extending that to Harry Potter, we see a similar mix of established and original characters and creatures. Anyone can tell a story with a basilisk, or a centaur, or a hippogriff, because these creatures are all derived from classical antiquity. On the other hand, I could not include a Death-Eater or a Horcrux in a new work, as those would be protected by copyright.