A magic tricks (or "illusion" if you prefer) ceases to be magic if the audience knows how it works. And the trick ceases to be valuable to the magician who invented it if other magicians can just steal it.
So what kind of legal protections do magicians have against the exposure or theft of
tricks illusions? Not many.
The courts, thus far, have not been too permissive when it comes to patenting or copyrighting magic tricks. Copyright law only protects works that are fixed in a tangible medium of expression, thus mere ideas don't get copyright protection. So only recordings, written descriptions, or photographs of magic performances may be copyrightable.
Even when courts have enforced registered copyrights for magic performances, they have made a point of saying that the illusions themselves are not copyrightable. In 2014, the U.S. District Court for the District of Nevada ruled another magician infringed a trademark belonging to Teller, of Penn and Teller fame. The magician had uploaded videos to YouTube that recreated Teller's "Shadows" illusion. The court was careful to note that, although magic tricks themselves are not copyrightable, dramatic pantomimes are. "The mere fact that a dramatic work or pantomime includes a magic trick, or even that a particular illusion as its central feature does not render it devoid of copyright protection."
Patents can be even more problematic for magicians. Patent protections require the disclosure of how the device or process works. So, while you might be able to prevent another magician from performing the patented trick, you can't prevent lay people from discovering, or worse, revealing how the trick works.
Magicians' best protection against the theft or exposure of illusions might be their colleagues. The International Brotherhood of Magicians' Code of Ethics requires that all magicians "[o]ppose the willful exposure to the public of any principles of the Art of Magic or the method employed in any magic effect or illusion."
No word on whether their punishments are as harsh as those of Gob Bluth's Alliance of Magicians, which blackballs any performer who reveals a magician's secret.