House-elf magic

a house-elf have their own brand of magic, as do many other magical creatures. Their magic is a kind of magic that allows them to do the bidding of their master and will at times override magic done by a witch or wizard.

Examples of House-elf Magic
In the canon, when Harry Potter inherited Number 12 Grimmauld Place andKreacher, Albus Dumbledore wanted to test to see if Harry had truly inherited his father's things. As a test, Harry was to give Kreacher an order. At the time, the only thing he wanted was for Kreacher to shut up. He told him to do so, and instantly, Kreacher almost choked on his own words, literally.

In the canon, Lord Voldemort required a House-elf for a job, and Regulus Black nominated Kreacher for the job. When the Dark Lord used Kreacher to drink the potion for him to place his locket, the Dark Lord left Kreacher their to die. Kreacher was in need of water, and ran to drink from the black lake. Inferi dragged Kreacher down to his death, when his master Regulus call him back and Kreacher was able to Disapperate out of the cave to his master.

Both examples of how elf magic allow them to do their job as a servant to their master.