The "UIStatemachine" is static, because you want be able to call it in another script and not want it on an object in the scene. To use it in a scene you need a script that is not static (the "UIStateMachineBehavior").
In the inspector, when you're in a state and go to another state. The new state will add itself to the "UIStateMachineBahavior" in the inspector. This way it remembers what states it has and to what it can switch.
In the "UIBaseState", when another state is created and called upon (the moment you switch states by for example press a button). The "OnEnable" function will then add the state to the "UIStateMachineBehavior" lists of states
When the player moves, the camera follows the player wherever it goes.