In Harry Potter and The Chamber of Secrets, Dobby tries to keep Harry out of school, and when that fails, Dobby tried to injure Harry so he would leave. We know that he tampered with a Bludger so it would aim only for Harry, but how could Dobby have gotten to the Bludger and cursed it? The Bludgers/Quaffles/Snitch are protected by strong magic to assure that no one will tamper with them. It would take strong dark magic to pass the protections put on the Bludger. How did a house-elf get through the protections, and curse the Bludger?
House-elf magic is different than wizards’.
Any protection that Bludgers have from magical interference mightn’t work against house-elf magic, since house-elf magic is different than wizards’ magic. For example, both Hogwarts and the Dark Lord’s Horcrux cave are protected against wizards Apparating in and out, but house-elves still can - the protection doesn’t work on their magic.
“But … you couldn’t Apparate in and out of that cave,’ said Harry, ‘otherwise Dumbledore –’
‘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.’
There was silence as Harry digested this. How could Voldemort have made such a mistake? But even as he thought this, Hermione spoke, and her voice was icy.
‘Of course, Voldemort would have considered the ways of house-elves far beneath his notice, just like all the pure-bloods who treat them like animals … it would never have occurred to him that they might have magic that he didn’t.”
- Harry Potter and the Deathly Hallows, Chapter 10 (Kreacher’s Tale)
Similarly, the protection against magical interference was likely designed to protect against wizards’ magic, not house-elves’. Since house-elf magic is different, they could tamper with the Bludgers without the protection against wizards’ meddling stopping them. Also, it mightn’t be that difficult to enchant a Bludger - George thinks the Slytherins did it, and Oliver Wood tells him that Madam Hooch had them locked in her office.
“We were twenty feet above her, stopping the other Bludger murdering Harry, Oliver,’ said George angrily. ‘Someone’s fixed it – it won’t leave Harry alone, it hasn’t gone for anyone else all game. The Slytherins must have done something to it.’
‘But the Bludgers have been locked in Madam Hooch’s office since our last practice, and there was nothing wrong with them then …’ said Wood, anxiously.”
- Harry Potter and the Chamber of Secrets, Chapter 10 (The Rogue Bludger)
Neither of them seem to think it impossible that Hogwarts students could tamper with a Bludger if it wasn’t that it was locked up, and Oliver Wood is very knowledgeable about Quidditch. If it was so sufficiently difficult to enchant a Bludger, Wood would’ve told George that it’d take such powerful magic that it’d be nearly impossible for any Slytherin to have done it, rather than that the Bludgers were locked up. Also, there’s no mention in Quidditch Through the Ages of the Bludgers having particularly strong enchantments against tampering, though there is a rule against the players using their wands on the balls.
“6. Wands may be taken on to the pitch2 but must under no circumstances whatsoever be used against opposing team members, any opposing team member’s broom, the referee, any of the balls or any member of the crowd.”
- Quidditch Through the Ages
This may mean it’s not that difficult to tamper with a Bludger, even without having a different type of magic.
House-elf magic is just that powerful.
We see on several occasions that house-elf magic is both extremely powerful and capable of completely bypassing many of the magical protections that affect wizards. House-elves are capable of apparating into places that are warded against it, they are powerful enough to duel a wizard in single combat, and we see multiple instances of them bypassing or subverting powerful magic. In addition to cursing the bludger Dobby performed the arguably more impressive feat of hexing Platform Nine and Three Quarters to reject Harry when he tried to enter. House-elf magic is very scary stuff.
From what I understand of house-elf magic, it is generally more powerful than wizard magic, which I believe is what contributes to their oppression in the books, wizards being worried about them taking over. Their temperament may not have always been as subservient as it is portrayed in the books.
Dobby could have apparated to where the bludger was kept (possibly ignoring strong magical protection due to his ability to apparate within the Hogwarts grounds) and if there was also magic protecting the box that the bludgers were kept in, its possible his elf magic could have overpowered it, he also could have been present at the match, and could have performed magic on the bludger at the start of the match.
House elf magic seems to be of a different variety than wizard magic, I would not necessarily call it stronger or weaker. The wizards might have just not have thought about safeguarding against house elf magic, same with the entrance to Platform Nine and Three Quarters.
A more elaborate answer here by Mary Lynch.