This is a house rule and needs your DM to tell you
Unfortunately, there aren't specific rules about training animals and how specifically it works, what they can do, or how it may change their stat blocks.
Your DM is allowing this and will need to let you know how it works.
Some guidance for your DM
Action economy is incredibly important in 5e. I'd be wary to add more combatants as that is going to skew the encounters. If they are allowed, as it seems they are, I would not give them the full blocks and abilities that Druids or Beast Rangers get. That steps on the toes of those classes.
Your DM is also going to need to figure out who is in control of the beast and how they're going to act/react. The simplest is that the player gets to do that, but remember that this is a beast and still has it's own mind. A DM may, at times, take agency over you for control of the animal if it makes narrative sense.
Technically, these may also be considered NPCs and may require a share of XP. They can't actually use the XP, just take it away from your shares, but they can/may detract from the actual party's XP total as well. This can be seen as a bit of a balancing factor for adding to the action economy.
Steve's answer also brings in the new optional rule from Tasha's Cauldron of Everything about sidekicks which could be another option to consider.