The goal is to defeat Mr. Demon's forces, who walk into town through one or more entry points, before they reach a certain goal area. For me, this meant frontloading the spawn points with ninjas. As soon as the demons appear, your ninjas set to work. You can direct them to certain locations by setting flags via a touchscreen menu.
The same menu used for flags (and for building) also houses items. I used a Ninja Baby on some monsters, which slows them down (they are caught up in the cuteness), thus letting my ninjas kill them before they damaged my base. The menu is a bit cumbersome in that you have to click a 'check' button after doing anything. You can't just select a Consultant Ninja and build a Consultant Ninja house. You have to select the location, select the ninjas, and then click the check. It's just slightly unintuitive.
Other than that minor issue, and the fact that I died a bunch, I really wanted to keep playing Ninjatown. Every single thing that happens is cute and hilarious, and I really wanted to survive through the next cutscene.