Short answer: In your case, the dog is a normal NPC and guided by the GM by default, although they can give you partial or total control over the dog at their discretion. For a longer answer, I present the following list of NPCs sorted by type to clarify in which cases the player has control over their associate NPCs:
A Ranger's companion needs to be commanded for it to take any action. Player's Handbook, page 93:
[The beast] takes its turn on your initiative, though it doesn't take an action unless you command it to.
Ordering the creature to move is a free action, but ordering it to Attack, Dash, Disengage, Dodge or Help actions consumes your action.
Ranger's companion (Unearthed Arcana)
In the Unearted Arcana version, the Ranger's beast has its own initiative, and the Ranger's player determines its actions without the cost of the Ranger's actions.
Normal NPCs including friendly monsters
An NPC that's on your side is still played by the GM, unless they shift control of the character to you. You can still talk to them on your turn as a free action to command them, but they are not guaranteed to obey. This category includes NPC party members, hirelings and beast companions or pets that do not fall under any other category.
A non-intelligent mount can be controlled directly by the rider, in which case the mount uses the rider's initiative and can perform no actions other than Dash, Disengage and Dodge. Note that this is not mandatory - you can also have the mount act independently, in which case it functions like a normal GM-controlled NPC. Intelligent mounts always behave as normal NPCs.
Creatures created through magical effects
Unless the spell states otherwise, NPCs created through magic by summoming, necromancy etc are played by the GM as normal NPCs regardless of their affiliation, unless the GM wants to shift the duty of playing the summoned creatures to the players. If a spell stipulates that the summoned creatures must obey the verbal commands issued by the caster (like Conjure Fey, for example), the GM should take care to follow commands issued. Other spells like Animate Dead explicitly state how the player controls the creatures.