In Islam, learning, teaching, and or getting paid to do magic is unlawful and haram. However if learning magic or witchcraft is for the purpose of nullifying it then it is not haram. Therefore watching the actions of magicians live, watching the actions of magicians in movies, researching books and magazines on magic, so long as they have no learning aspect involved, then there is no problem, unless it becomes haram from a different aspect; for example it causes the promotion of magic, etc.
From an Islamic point of view, acting, teaching, learning, and profiting by magic is unlawful, haram and considered to be one of the greater sins and in some hadiths teaching and learning magic is deemed as a cause of Kufr.
In numerous instances magic causes the misguidance of people, and the diversion of the truth and also unstable foundation of the beliefs of simple-minded people. Of course this ruling like many other divine rulings has exceptional cases, including; learning magic or witchcraft for the purpose of nullifying it or its effects on someone who has been harmed by it, or to nullify a false claim of prophet hood.
Studying books and magazines, watching magicians or looking at magicians on television and movies, so long as they have no learning aspect involved and is only for recreational and entertainment purposes then there is no problem, unless other factors become applicable, such as; a movie or book that is such that it has a negative effect on someone and causes them to become misguided, or the keeping of movies and books which are considered misguiding, or if it causes the promotion of magic or witchcraft, which from these aspects are measured as haram.
 Tahrir Ul-Wasileh Vol.1, Pg389, Ques.16
2 Hence, if upon watching a movie or reading a book learning occurs, meaning the individual with viewing this movie or reading this book learns magic, then that action is haram.