Here's the lowdown:
IN REALITY: Ninjas were commoners who were displeased with the government's disarming them, which is why they learned to fight with a myriad of ordinary things used for agriculture: such as Grain flails (Nunchucks), Scythes (Kama), and Bo staffs (long pieces of bamboo). If they had to go over a wall, they carried a ladder. if they had to steal something, they took it when nobody was looking. They were effective because they did simple "stab and kill" assassinations and could disappear just by bowing their head or putting on a different hat.
IN D&D: They can be achieved by multiclassing, or by using the CA class, both are pretty darn awesome.