Each frame of the Update() method of the InputMapper C# script class reads the Unity input system's Horizontal axis value and sets the Animator state chart's axisHorizontal parameter to this value. If the value is less than (left arrow) or greater than (right arrow) zero, if appropriate, the Animator state system will switch to the other state.
The LocalScaleSetter C# script class actually changes the localScale property (with an initial value of 1, 1, 1, or reflected horizontally to make it face left at -1, 1, 1). For each state, the public Vector3 variable can be customized to the appropriate values.
The OnStateEnter(...) method is involved each time you enter the state that an instance object of this C# class is attached to. You can read about the various event messages for the StateMachineBehaviour class at https://docs.unity3d.com/ScriptReference/StateMachineBehaviour.html.
When we press the...