There are two major ways to create a god NPC. The method depends on the purpose the character serves in the campaign. In either case, the god should help facilitate an adventure for the PCs. It is seldom a good idea to create a powerful NPC with a strong presence that fails to further the story.
The Golarion Pathifinder setting provides excellent examples of both methods with true gods and demigods, as described below.
1. Plot Device
I sometimes call this a "force of nature" NPC. A plot device god works best as some nebulous force that drives the plot by helping the PCs or complicating their lives. They rarely should directly interact with the PCs. The goal of any encounter with the plot device god should involve a quest, social encounter, or any other encounter that does not involve physical confrontation. A friendly plot device god might be a quest giver while an enemy plot device god might create a storm or a curse that can only be appeased with a quest.
Roleplaying Interactions
If the god must expose themselves to direct confrontation, then make sure all interactions are fun and interesting to the players. If a PC attacks then, don't just say "it doesn't work." Have something interesting happen, like the weapon going through them or blowing the fighter away. If you don't want this to happen at all, then have the god manifest in a way that makes it impossible for both sides to directly affect each other. Maybe the god appears as a reflection in the mirror or as a ghostly avatar.
Statistics
A god as a plot device should not have any actual statistics. Creating a stat block is unnecessary, patronizing to the players, and limits your ability as a GM what they can and cannot do. By creating a stat block, you create limitations of the character's power, which is not something you want to do when creating a character as an unassailable force of nature.
Example
True gods in the Golarion are excellent examples of plot device gods. They have no statistics and rarely directly interact with PCs. True gods affect a plot by changing the circumstances or direction of an adventure. For example, in the module Clash of the Kingslayers, a god transforms a temple into a massive walking monster that the party has to go inside and explore in order to figure out a way to stop it. In the Wrath of the Righteous adventure path, a goddess offers mythic power in exchange for passing a test.
2. Active Character
A god as an active character essentially functions as a very powerful NPC. As such, you would stat and run them as you would any sufficiently powerful NPC. Such a god directly affects the PCs with their actions. However, it's absolutely vital that the PCs can interfere with or invoke those actions. Do not have an evil god enact an evil plan unless the PCs have some way to thwart it. Do not allow a good god fix a problem unless the PCs actively do something to receive that aid.
Roleplaying Interactions
You need to determine a good reason why an active god won't wipe out a party or make an adventure trivial. An enemy god might not be able to do so or find it impractical to directly confront the PCs. Maybe they don't see the PCs as big of a threat to directly deal with? A good god might be too occupied to directly do the PCs's work for them.
Usually the best way to handle it is having the PCs only interact with NPCs that work for the god. Maybe they have to face the evil god's minions. Maybe they can only speak to a good god by their servants. For a low level campaign, an active god should work more like a plot device god.
Only have an active god directly confront the PCs if you intend to change the direction of the plot (like a plot device god) or allow the PCs to directly affect the god.
Statistics
Follow the monster creation guidelines in the Monster Manual as you would stat any other creature. Don't just make up a list of absurd stats. Instead, determine what CR the god should be based on how high of a hypothetical party should be able do and then stat them accordingly.
Examples
Demigods in the Golarion setting are good active god examples. Unlike true gods, demigods in Golarion usually have statistics as a CR 20-30 creature. They're designed as powerful final opponents for a high level party or as rare allies called upon sparingly.
The Treerazer and Arazni are good examples of enemy active gods. The Treerazer is a demon trapped in a blighted forest that slowly tries to expand his influence. Arazni is a queen of an undead nation. Both of these demigods can directly affect the party without actually confronting them. A campaign using these gods will likely see the PCs thwarting their evil plans from a distance and taking down their minions until the campaign reaches a climax that confronts the demigods themselves.
Talmandor is a good example of an allied demigod as he's a force of good that likes to take an active role in a nation's politics and crusades. However, he rarely directly interferes with mortal affairs unless directly asked or if a massive national threat occurs.
This is a very good question that ties in to both the mechanics of different types of characters and their narrative role, and in addition to those, their role in the group. There is no clear boundary where an NPC becomes a GMPC, and hence I will be explaining the traits of a GMPC rather than try to define a boundary that doesn't exist. However, it will still give you a pretty good picture in broad strokes what a GMPC is like and how it differs from a normal NPC.
The narrative GMPC
The narrative side concerns the role of the PCs --- they almost universally are the protagonists of the story the players are playing. Protagonist means "main character", and they can be seen as the main actors and focal points of the unfolding story. A work can have many protagonists: eg. Gandalf, Aragorn and Frodo are all protagonists of The Lord of the Rings (and to a lesser degree, so are a variety of other characters!), and Woody and Buzz are the protagonists of Toy Story.
For contrast, NPCs are usually supporting characters that might have a big role in the events going on, but who are not focused on in a similar way. They might be antagonists (opponents of the protagonists) or supporting characters who reinforce the protagonists' story somehow.
A narrative GMPC is a character, played by the GM, who is a protagonist similar to the PCs, complete with comparable agency and personality to the other PCs. This is often seen as an issue since this means they also claim a share of the narrative focus --- while also serving as the chief director of the story. Care must be taken so the GMPC won't steal the show and turn the game into a novel written by the GM instead of a collaboratively told story.
The mechanical GMPC
The other side of GMPCs is more tied to particular game systems and depends on the mechanical distinction between PCs and NPCs. Some RPG systems make little or no mechanical difference between the two classes of characters: eg. Wild Cards of Savage Worlds work almost equivalently regardless of whether they're PCs or NPCs. They're built using the same rules and they follow the same rules with only minor alterations.
In the other extreme end, we have games like Apocalypse World where there are very few rules directly concerning NPCs. They cannot trigger moves themselves, only be affected by the moves triggered by PCs. In the middle of the spectrum, we have games like Dungeons and Dragons where NPCs follow the same basic mechanics as PCs but have simpler features that better suit their role in the game than a full-blown PC would.
From the mechanical standpoint, a GMPC is a character who is played by the GM but uses full or slightly altered PC mechanics. However, the term is usually not used for antagonists, as building enemies using the PC rules is fairly common in games like DnD (even if it's not always advised).
The "missing role" GMPC
The third axis of GMPC is the role in the group and ties in closely with the earlier two. Some games expect the PCs to form a group with a particular composition, or are commonly played as such by convention. This can result in a "role" needed for smooth gameplay experience being missing from the PCs created. The stereotypical example is missing a "Healer", which is necessary (or ostensibly so) for playing certain systems or scenarios. A GM can attempt to remedy the missing role without forcing anyone to switch their character by creating a new character to play the missing role instead.
Whether or not the Healer (or other "missing role") is referred to as a GMPC varies a bit. By my experience, if the character is mostly a tagger-along who has little purpose or personality outside their mechanical niche, they're more often referred to as "NPC Healer", "NPC Thief", "Henchman", "Bodyguard" or something similar. Some games (eg. Dungeon World) even have their distinct rules for this kind of followers, separate from both normal NPC and PC rules. Therefore, this ties back into the other two elements: whether the character is mechanically complex enough to be considered a "PC" and whether the character is focused on narratively enough to qualify as a protagonist.
In a nutshell
Is the character played by the GM...
- a significant enough focus in the story to be considered a protagonist?
- endowed with similar level of backstory and character development to the PCs?
- played using full or significant PC mechanics, in systems where they differ from NPC mechanics?
- mechanically fully present with the group, partaking in all or most challenges?
- built to conform to a particular role in the group that's usually reserved for a PC?
The more questions you answered "yes" to, the more soundly you are in GMPC territory.
Best Answer
These are the droids you're looking for. :)
You should consider using a droid / AI. Droids are ideal for the non-conflict (or limited conflict) NPC role: just think of R2D2 and C3PO from Star Wars: They do what they must do, but can relatively easily be ignored, commanded... and even turned off.
As you yourself have said in a comment, they can be controlled by a party member - but I'd recommend allowing them to be commanded by both (all) PCs, to avoid unbalancing your game.