Ninjas were Japanese fighters. Unlike Samurais, they had no loyalty. They spent most of their lives training hard. They studied many martial arts including Ninpo and Kendo.
Ninjas were masters of the shadows. Their main goal was to kill without being seen. They always try to avoid confrontation. They hide and kill when their opponent least expects it. They can move without making a noise so they would be able to sneak up behind people.
This was considered disonorable, but it was much more effiecient. In Japan at this time you were supposed to have a master that you worked for, and would die for, and would always announce it before a battle. When people fight, there will always be a chance of death, that is why one must assassinate.
Ninjas usually worked for money. They would be hired for difficult jobs such as assasinations, infiltration, espionage, etc. It was disonorable to hire a ninja, but in most cases no one ever found out.