Change animation based on event or user input

I have the following Animator set up:

Currently, the main_character (player) animates with the animation Standing_Right. Standing_Right loops onto itself. I want it when the player presses the left arrow key, the animator switches to the Standing_Left animation. How can I do this from the animator? How can I do this from the code side? Which is better practice?

Change the tab from “Layers” to “Parameters” (referring attached image) and define state variables. From code behind, set these variable so that the animation states can change.

e.g., (psuedocode - please check parameter positions)

GetComponent<Animator>().SetInt("YourVariableName", yourStateValue);