Here’s a summary of ninjas stolen copied borrowed from wikipedia:
“In the Japanese culture, they were usually trained for dangerous missions. Their exact origins are still unknown. Their roles may have included sabotage, espionage, scouting and assassination missions as a way to destabilize and cause social chaos in enemy territory or against an opposing ruler, perhaps in the service of their feudal rulers, or an underground ninja organization waging guerilla warfare.”
All ninja fans should refer here to the official ninja webpage.