Obviously Hagrid was half-giant and half-human so it isn't limited only to full humans but what about a full giant, for example?
Does a creature have to have some human blood to be a witch or wizard?
There are some non-human creatures that can do magic, like goblins and house-elves, but those beings aren’t called wizards - wizards have to be human, at least partially. Griphook, a goblin, makes a clear distinction between wizards and other magical beings (including goblins like him).
“The right to carry a wand,’ said the goblin quietly, ‘has long been contested between wizards and goblins.’
‘Well, goblins can do magic without wands,’ said Ron.
‘That is immaterial! Wizards refuse to share the secrets of wandlore with other magical beings, they deny us the possibility of extending our powers!”
- Harry Potter and the Deathly Hallows, Chapter 24 (The Wandmaker)
The term ‘wizard’ specifically means ‘human who can use magic’, so doesn’t apply to other beings or creatures that can also do magic. So, Griphook doesn’t think of himself as a wizard, nor do wizards think of goblins or other magical beings as wizards, since ‘wizard’ implies human. Wizards are allowed to have wands, and according to clause three of the Code of Wand Use, no non-human creatures are allowed to have wands. This includes house-elves, since Crouch’s house-elf having a wand breaks clause three of the Code of Wand Use.
“Come off it, Amos,’ said Mr Weasley quietly, ‘you don’t seriously think it was the elf? The Dark Mark’s a wizard’s sign. It requires a wand.’
‘Yeah,’ said Mr Diggory, ‘and she had a wand.’
‘What?’ said Mr Weasley.
‘Here, look.’ Mr Diggory held up a wand and showed it to Mr Weasley. ‘Had it in her hand. So that’s clause three of the Code of Wand Use broken for a start. No non-human creature is permitted to carry or use a wand.”
- Harry Potter and the Goblet of Fire, Chapter 9 (The Dark Mark)
Furthermore, the Dark Mark is described as a wizard’s sign because it requires a wand, making even clearer that ‘wizards’ must be human, since only humans are permitted wands.
It seems from the introduction to Fantastic Beasts and Where to Find Them that only humans are called witches or wizards. In a section there titled "What is a Beast?", Newt Scamander indicates that non-human magical beings are not wizards:
In a spirit of friendship he summoned all 'beings' to meet with the wizards at a summit to discuss new magical laws and found to his intense dismay that he had miscalculated. The meeting hall was crammed with goblins who had brought with them as many two-legged creatures as they could find.
Embittered, Burddock Muldoon forswore any further attempts to integrate non-wizard members of the magical community into the Wizards' Council.
Additionally, when Harry, Ron, and Hermione overhear Griphook explaining why he is on the run in Deathly Hallows, Griphook clearly indicates that goblins are not wizards:
"You had a false impression," said the higher-voiced of the goblins. "We take no sides. this is a wizards' war."
Earlier in Deathly Hallows we see that house-elves are distinguished from wizards even though they can do magic (sometimes even greater than wizards):
"Elf magic isn't like wizard's magic, is it?" said Ron. "I mean, they can Apparate and Disapparate in and out of Hogwarts when we can't."
In Order of the Phoenix the centaurs clearly indicate to Harry and Hermione that they are not wizards:
"Perhaps you thought us pretty talking horses? We are an ancient people who will not stand wizard invasions and insults! We do not recognize your laws, we do not acknowledge your superiority, we are—"
Thus, we have examples showing that all three primary types of magical beings with human intelligence are not considered wizards. Indeed this seems to be the message of the statues in the Ministry of Magic in Order of the Phoenix:
A group of golden statues, larger than life-size, stood in the middle of a circular pool. Tallest of them all was a noble-looking wizard with his wand pointing straight up in the air. Grouped around him were a beautiful witch, a centaur, a goblin, and a house-elf. The last three were looking adoringly up at the witch and wizard.