Sentarô Fushimi is a master of the Ninja arts, which means not only can he sneak around and steal and assassinate people, but he can do all sorts of magical stuff, like run on clouds, and teleport and cause everyone to see things burning when they're not. He's a Koja Ninja, so when the general of the Osaka Castle wants to make sure his plans to raise new fortifications around the Osaka Castle aren't stolen, he sends for Fushimi. He doesn't reckon with Nakajirô Tomita, who's the master of the Iga Ninjas. They can do anything the Koga Ninjas can, and they kidnap the child princess, which is way against the Ninja code of ethics. Still, they get to wear black, so that's one up for them.
It's a family movie, so everyone has a child running around, getting involved in the general mayhem. I've mentioned the princess, but she has an older brother, and Fushimi has a son, and so does Tomita, who rescues the princess and returns her to her family. Then when they toss him in jail for being the Evil Ninja's son, she rescues him.
I'm not sure where magical ninjas came from. Ninjas (actually 'shinobi') seem to have arisen in the 15th century. They were recruited from the lower classes and worked for money, which made them unsuitable for literary discussion. By the time of the Meiji Restoration, legend attributed to them the powers of invisibility and being able to walk on water. Once they were able to do that, I imagine, the sky -- or at least the clouds -- were the limit.
This is a silly movie, but it does have an appropriate bit of moralizing and it's very good fun for someone who just wants something suitable for children and adults looking to escape from the serious issues of the day. Goodness knows, us old people can use that.