As a junior teacher, I taught summer school. The more senior teachers were doing continuing education. We all made lesson plans, prepared materials, and had mandatory professional development seminars.
You need a repeating visual pattern, a fairly busy one. Then you need a greyscale image of what you want the "magic" picture to be. You deform the repeating pattern by the intensity of the greyscale image.
When your two eyes overlay the background images, your brain highlights the distortions and interprets them as depth... at least if your eyes are good enough to give your brain that information in the first place.
If you want to know more, the algorithm to do this is public, and you can set it up in eg. javascript in an afternoon.
As a junior teacher, I taught summer school. The more senior teachers were doing continuing education. We all made lesson plans, prepared materials, and had mandatory professional development seminars.