This is a delicate subject. The majority of scholars say that illusions (what you are asking about) is also part of the overall Magic
سحر not allowed in Islam.
For example, take for instance what Allah says in the Quran about Musa when he faced the Pharaoh's magicians:
And throw that which is in your right hand! It will swallow up that which they have made. That which they have made is only a magician’s trick, and the magician will never be successful, to whatever amount (of skill) he may attain.’ [Ta-Ha 20:65-69]
Those magician's made the illusion that their sticks turned into snakes, which when Musa dropped his stick and it ate them all they believed in Allah since it is beyond the possibilities of illusions they know is possible.
Deception is also another important factor that caused Shiekhs like Muhammed Salih Al-Munajjid say it is the same as Magic, in the end it takes your money to show you misleading logic.
The people who say this illusion is OK, are not many but their claim comes with valid points:
- Illusions are just optical illusions and does not involve black magic/bewitching, which happened during the Musa event:
He [Moosa] said: ‘Throw you (first).’ So when they threw, they bewitched the eyes of the people, and struck terror into them, and they displayed a great magic [al-A’raaf 7:116]
- Another reason is the fact that this is something anyone can learn without having to become a disbeliever.
In the end, I advise you to stay away from it, Even if it is no Haram, it is borderline which is always best to leave such things.