It depends on how complex you want your NPC party members to be. At its most simple, you would need the companion NPC to have a companion script set. These can be added to the NPC by clicking Import in the properties window, and selecting script sets, and choosing the one called "b_CompanionScripts." Also make sure the NPCs faction is set to "Defender" (one of the standard factions).
Adding and removing the NPC from the party can be handled by "ga_" scripts in conversations.
If you want more complicated companions, or a Storm of Zehir type party creation system, it will involve more work than that. There are a number of Henchman and Companion tutorials and systems available on the NWVault and the Nexus. Just go there and search "companions" and you should find something that will work for you.