NPCs ending up in the party is an inevitability. The PCs make friends with an NPC and invite them to join the adventure, or perhaps there is an NPC that needs to accompany them for whatever narrative reason.
In any case, the presence of NPCs in the party poses a problem: mechanically, more NPCs in the party means more actions to resolve in an encounter, where you end up talking to yourself as the NPC engages with other NPCs. What this results in is less time for the spotlight to be on the players, and when that happens, you end up playing the game with yourself.
NPC Story Tags
The solution in OSR+ to the problems described above is to treat NPCs as story tags.
When you create an NPC in the first place, you already have the NPC's stats in NPC shorthand—this reference should remain with all your other stats in your prep as normal. However, when that NPC joins the party, their mechanical function changes. Instead of the NPC having a full range of actions as would be expected like a PC, the NPC is reduced to its tag, and PCs may invoke its tag once per round to aid them in the action.
Let's use the NPC named Korg as our example throughout this section. He's a muscle-bound Beastmaster of the Fighter class. Mechanically, Korg has a high Mighty and lots of AP and HP. But he's also kindhearted and extremely loyal to his friends.
Invoking NPC Story Tags
When Korg becomes an NPC in the party, you set aside his stats as far as what he can do from round to round in the encounter. Instead, he becomes a global story tag that any player can invoke, but only once per round. You decide what story tag best represents Korg when you write up his stats. For example, Korg might have Heart of a Golden Retriever to signify his loyalty to friends, or Friend of the Forest to signify his power over animals as a Beastmaster. You can also give Korg multiple tags, if he's high enough level.
Any player can then invoke Korg's story tag in addition to whatever they're doing as their action for the turn. If Korg's story tag makes sense in conjunction with the PC's action, then you treat his story tag as a +2 to the PC's action, as you would any other story tag. From the point of view of the fiction, Korg is doing stuff that helps the PC carry out their action.
NPC Tags in Action
For example, if the PC is under assault by a mob of enemies, the player might invoke Heart of a Golden Retriever when they're being attacked to add a +2 to their defense roll. This could be represented in the fiction as Korg rushing over to help the PC fend off the attack, because he is so loyal to his friends.
NPCs & the Aid Others Action
In this model for NPCs-as-story tags, they cannot take actions in an encounter. The assumption in the fiction is that NPCs are always doing something beneficial in the fight, but mechanically, only the PCs can advance the narrative. While the NPC might be exchanging blows with enemies, only PCs can strike the final blow. (Alternatively, the NPC could be conceived as "striking the final blow" if their tag is invoked as the PC acts.) This way, the spotlight is always on the players.
That being said, NPCs can take the aid others action if a player invokes this action in lieu of invoking the NPC's story tag. As is the case with players invoking the NPC's story tag, the NPC can only take the aid others action once per round. So if the party wants Korg to grab the artifact while they engage with the baddies on the field, one of the players can have Korg take the aid others action on their turn, so that he can go do that (this does not use up the PC's action). Korg would then act on the same turn as the player who invoked him.
Note that Korg cannot take the aid others action to participate in group action (which ordinarily confers a +2 to the roll). Any time he participates in group action, he confers no mechanical benefit, unless the player invokes his story tag.
Party NPCs vs. GM-Controlled NPCs
Generally, NPCs aren't "in danger" in the same way the PCs are, in that enemies in the encounter do not bother targeting the NPCs directly—from a fictional point of view, the enemy NPCs are engaged with the party's NPC, it's just that that engagement has no chance of moving the narrative forward unless a PC is involved. Of course, if the PCs are defeated, so too are the NPCs in their party.
Targeting NPCs as a GM
As a GM, you may target NPCs in an encounter. Any combination of GM-controlled NPCs in an encounter can sacrifice their action(s) to nullify the use of an NPC's story tag for the round, so long as the group of GM-controlled NPCs meet or exceed the NPC's level.
For example, if Korg is 3rd level, then a mob of three 1st level NPCs can sacrifice their action to take Korg's story tag (and his ability to take the aid others action) off the table for that round. This means that the mob is engaged with Korg, so he can't do anything to help the party.
Most people in the world are not adventurers and so their stats are not quantifiable in the same way the PCs are.
NPCs like the neighborhood barmaid or the lowly blacksmith just roll a d6 when they're required to roll against something, and explode on a 6. They have 1 HP and are on death's door when they take any damage at all. You can optionally give them a skill that makes sense—the barmaid probably has Craft (Bartending) and the shop owner Craft (Blacksmithing)—but in general, they are no match for the PCs or other adventuring NPCs that actually have stats.
On "GM NPCs"
A "GM NPC" is a derogatory term for an NPC who is acting as a mouthpiece for the GM. The NPC is there to suggest courses of action that steer the players in a direction the GM desires.
The long and short of it: don't create GM NPCs. The use of GM NPCs is equivalent to railroading, as you're just using the NPC as a puppet with the goal of pre-determining outcomes in the narrative. All of the rules for NPCs-as-story tags, as described above, are written with the intent to keep NPCs out of the spotlight, so the last thing you want an NPC doing is influencing the decisions the players make via thinly-veiled advice from the GM, unless the party specifically asks for the NPC's advice.