it depends on whether you're in single player or multiplayer. in single player, you cant spawn bots, but you can spawn npcs. in multiplayer, you cant spawn npcs, but you can spawn bots. the difference is subtle, but npcs range in skill a LOT more than bots do. desann the npc is a lot more powerful than the bot, however the TK-421 bot is way more powerful than the stormtrooper npc. anyway, onto the commands.
if you're playing single player, you first need cheats enabled (/HelpUsObi 1), then type
/npc spawn "npcnamehere"
in a multiplayer server that you have admin rights to, simply type