In programming, black magic is a technique that works, though nobody really understands why. More obscure than voodoo programming, which may be done by cookbook.
See also: deep magic.