Historic Sohei were the fighting-monks of Japan who lived in monasteries and devoted their lives to physical and spiritual perfection.
However, unlike their Kung-Fu / Buddhist counterparts in China, Sohei were quite militant and did not take the same vows of non-violence and could be more closely likened to western crusading knights. Suffice to say this did not go down well in feudal Japan who were not particularly given to religious crusading the same way as Europe was, they were eventually destroyed by Oda Nobunaga in the late 16th century.
They were also similar to real-life Shugenja but were more closely associated with organised monasteries, rather than individual hermits or court advisors.
3rd Edition D&D
Found in Oriental Adventures, the authors could have been tempted to just use the Monk class to represent them like they could also have done with the Shugenja, but Sohei of their era trained in multiple weapons and wore armour, so they required their own class which appears to function very similarly to cross between a Monk, a Barbarian and a Paladin.
Just like the Monk, it is required to be Lawful, it has the same BAB progression and gains a couple of abilities such as Deflect Arrows, Defensive Strike (which allows you to counter an opponent who misses you) and immunity to sleep and stunning effects.
Similarly to the Barbarian, it gets the ability to Ki Frenzy which is like the lawful version of Rage that grants STR & DEX bonuses as well as the Flurry of Blows that a Monk would normally get. In addition to this, the Sohei eventually gains damage reduction, the ability to remain conscious when they should normally be disabled, and Mettle which is like Evasion, but works for Fortitude effects.
From the Paladin the Sohei gets a reduced divine spellcasting list, which contains mostly buffs and debuffs but no healing or offensive spells.
What hurts the class is the lower BAB progression, since your Flurry of Blows only works while in Frenzy, so you can't really become the killing machine of either of the three comparable classes (at least not all the time), as well as your lower hit point dice and inability to cast healing means you can't tank things as well as a Barbarian or Paladin could, despite being able to wear Heavy Armour. However, this is countered by your spell list so you can buff yourself up to fill so that you can fill the role temporarily.
That's what makes it a good stand-in for any of these classes if your group does not already contain one (probably not a Paladin since those are usually banned in Oriental settings) since you can stand in for nearly any front line role comfortably be it tank or damage dealer, particularly this class would make a good alternative to a barbarian, especially in more civilised settings where you can use the title of "Monk" to roleplay your way into the respect of NPCs.
Playing a Sohei
This class can approach combat the same way that more straightforward Fighters do and start swinging around big weapons and hoping for more damage. Yes, you're less accurate due to your BAB progression, but your Flurry of Blows during Ki Frenzy lets you swing more often. Even outside of Frenzy, your buffing spells only help you in combat so you can quite happily take the second rank of melee combatants and deal with the annoying pests while your primary warrior takes on the Boss.
- The Bear Warrior prestige class is a nice fit for the Sohei, since it is one of the very few prestige classes that requires Ki Frenzy as a qualifier for entry. This puts you onto the Good BAB progression and enhances your Frenzy ability by letting you turn into a BEAR while doing it. Imagine a character with a half-decent base attack score, a massive strength modifier (+20 in Dire Bear form!) and still gets Flurry of Blows? That's right.
- Hilariously, with only a few levels in Rogue you can qualify for Drunken Master, which gives you a variety of mobility and armour-based bonuses that you can still use IN FULL ARMOUR! Not a bad choice at all, and probably one that had never been considered.