This question was asked of the Ohr Sameach Ask-The-Rabbi list last year,
and while I do not have all the references handy, the answer is like this:
it is permissible provided that 1) The performer clearly lets the people
know beforehand that what he is performing are _tricks_ not "true" magic,
and 2) Shows how at least one trick is performed. Indeed, soon after this
issue came out, I attended the birthday party of one of my son's
classmates, where the magician, Baltimore's Orthodox "Magic Michael" did
precisely that.
L'havdil, Islamic law apparently has a similar stricture. Mohammed Ali,
who now does magic as a hobby, follows the same procedure, which he says is
mandated by his faith.
Mike Turniansky