Well, it's about time to actually talk about ninjas in your game. We'll assume if you're reading this blog you're probably playing D&D, or one of its family of games. If you're playing a skill based game or an indie game, you can pretty much craft a ninja with that system, and you probably don't need much help from me.
If you want to play a ninja in D&D though, it can be a bit tough, depending on which system you're using.
In OD&D, depending on if you're using any supplements or not, you've got the baseline Fighter as an option in the core rules. Not the best choice, some may think, but it's all in how you describe the character and what your DM allows you to get away with. With Greyhawk you get the Thief, and Blackmoor throws in both the Assassin and Monk. These three classes all work really well, even if none are specialized as 'ninja.' Baseline AD&D also gives you these three classes, and the Ranger also can work.
In B/X you're pretty much stuck with the Thief as option #1, and Fighter as a backup. BECMI/RC adds in the Mystic, similar to the Monk. B/X Thief does get a nice bonus in being able to use all weapons, but the BECMI list is good enough (better than the AD&D short list).
Of course, Oriental Advetures has a dedicated Ninja class, but it's a bit complex. The idea is that a ninja should keep their ninja identity secret from the other PCs, so they allow humans to multiclass. You can't only be a Ninja, you have to be a Ninja/something. Needlessly complex, and kinda setting up another Paladin problem, where dick DMs are going to be constantly forcing the Ninja player into situations where they have to either expose themselves as a ninja (requiring them to either turn on their companions or else have the clan hunting after them for the rest of the ninja's life), or else do nothing really for a large part of the game.
2E, with the Complete Ninja Handbook, tried to alleviate some of the problems. The use of 2E kits allows not only a varitey of Ninja class characters (although they're just a variant Thief with slightly different weapon proficiencies and starting skill percentages), but there are also kits for other classes to belong to the ninja clan. That makes an all-ninja campaign possible, but there are still the problems with the ninja mixed with the standard adventuring classes. The book does address some of the problems, and gives a few possible ideas for how to deal with them. All in all, it's not a bad book, even if it does rely on some mechanical choices that I'm not too fond of (kits, proficiencies, etc.).
Now 3E actually, IMO, did the ninja right. In the PHB classes, with the way feats and skills and multiclassing work in that edition, you could use the Rogue (Thief), Ranger, Monk, or Bard even as a base, and with some multiclassing amongst these classes or a few others (Fighter and Sorcerer being good choices, depending on your idea of what a ninja should be), you could craft a fairly good representation of it. That's kind of the strong point of 3E anyway, allowing you to custom build the sort of character you want.
3E's version of OA made another good choice. Instead of adding a Ninja class, they told you to do what I just told you about above. Of course there were ninja Prestige Classes you could take if you just absolutely HAD to have the word 'ninja' on your character sheet [and were too dense to just write it there yourself]. But then 3rd party supplements ended up coming out with all sorts of alternate ninja classes, not to mention the fan-made ones. [I used to spend a lot of time, during my 3E days, on the OA forums over at Wizbro's website.]
4E, I don't know, and it probably doesn't matter if they have a 'ninja' class or not, cause it will play like every other class in 4E.
Anyway, for those of you not playing 3E (I assume most of you), I think the real trick to playing a ninja successfully in a campaign is to avoid the assumed dynamic of 1E OA. Yes, your character is a ninja. Yes, you likely don't want commoners or ENEMY samurai to know that. Yes, you maybe want anyone to know your real name (like Spiderman or Superman, you need that alter-ego). But your adventuring companions should at least know that you are a ninja.
Maybe it comes from the misunderstanding of the concept of 'honor' as the samurai saw it. The reason they used trained ninja for stealth, spying, theft, sabbotage, etc. was because it would be dishonorable for THE SAMURAI to do such. Samurai still wanted all that stuff done, they just didn't want to get their hands dirty. So a samurai would not instantly cut down any ninja they encountered if they learned they were ninja because said ninja was dishonorable. If they were a daimyo, they'd likely be interested in hiring the ninja. Unless the ninja is spying on or trying to assassinate you at the moment, of course, then you'd want them cut down.
Samurai didn't expect everyone to live by their code of honor. So yes, your Samurai character could, and would, assuming a standard D&D type adventuring mindset, travel with a Ninja. It would be the smart thing to do. The Samurai would know that there will be situations that might be easiest to deal with using dishonorable methods. Mr. Ninja, step up please, it's your turn!