Ninji first appeared in Super Mario Bros. 2, where there were two varieties: one that jumped up and down in it's place, and another that ran around jumping and chasing Mario. Like most enemies in SMB2, they could be picked up and thrown at other foes. Ninji made a comeback (with the exact same graphics) in Super Mario World. They are only located in Bowser's castle and Tubular, a dark room where they are practically invisible unless there is a spotlight shining on them. Here they jump up and down in one spot, but unlike in SMB2, a simple stomp will defeat them. Ninji was strangly omitted from the final credits.
In their original appearance in SMB2, they wore what appeared to be an all-black outfit, with two points atop the head and two white "buttons" situated on the abdomen, not unlike Mario's overall buttons. In some levels, Ninjis were purple instead of black due to the NES's palette limitations, but in the later Super NES and Game Boy Advance remakes, they were always purple. They were also slightly redesigned as creatures who were wearing no clothing whatsoever. The two points became cat-like ears and the "buttons" became the fangs of a mouth.
SMW Central Meme
On most forums, if a user posts a reply on a thread only to find out that other users beat him to the punch, the others will say that he was "ninja'd". Likewise, at SMW Central, people will usually say "Ninji'd" instead, an obvious reference to this creature. Even though there's a "Thread Review" feature that allows users to see the last 10 posts, not all users actually pay attention to this feature. So, in March 2010, Kieran implemented "ninja protection", which, when a user presses the "Preview" button, notifies them of new posts.
As of July 2010, Kieran decided that ninja's/ninji's/FakeEdit(ing) needed to be stopped beacuse "Nobody gives a shit. It makes you look like a retard." He also implies that doing this is the opposite of the ninja system implementation, regarding the user as a "Moron" for not being considerate in editing their reply.
Read the original post Here. 
Ninji are only available when SP4 is set to use GFX0E. GFX0E is sort of a proto ExGFX set used by Nintendo to allow Pitchin' and Puntin' Chucks and Volcano Lotuses to co-exist in the level Tubular. Some of Peach's graphics for the ending screen are also located here, and Ninji's graphics are located in an odd bit of space that is off the main 16x16 grid. This can make it difficult to fit them into ExGfx sets with other sprites. By default, Ninjis use palette 0C, but this is not readily apparent since they still use their black and white 8 bit graphics. (Only palettes 0C and 0D function properly in the dark room)