What does the Church teach about children doing magic tricks?
If, by magic tricks, you mean the type of sleight-of-hand illusions that are based on manipulating appearances, there is nothing inherently objectionable with children participating in and enjoying this kind of “magic.” The word magic for this kind of hobby is somewhat misleading. The person is not really performing “magic” but is proving that external appearances can be deceptive and that there is more to reality than what can be experienced by the senses.
If, by magic, you mean anything related to occult “magick,” the Church definitively condemns participation in the occult. Please see the Catechism of the Catholic Church 2117:
All practices of magic or sorcery, by which one attempts to tame occult powers, so as to place them at one’s service and have supernatural power over others – even if this were for the sake of restoring their health – are gravely contrary to the virtue of religion. These practices are even more to be condemned when accompanied by the intention of harming someone, or when they have recourse to the intervention of demons. Wearing charms is also reprehensible. Spiritism often implies divination or magical practices; the Church for her part warns the faithful against it. Recourse to so-called traditional cures does not justify either the invocation of evil powers or the exploitation of another’s credulity.