In short, a finite-state machine (FSM) is a computation model that is run through an algorithm in order to simulate sequential logic. This sequential logic is represented using states, which will control the essence of the behavior.
A more detailed explanation of an FSM is that it is a computation model that describes an imaginary or hypothetical machine that is made up of one or more states. The machine will have a certain set of behavior and decision-making processes, depending on which state is active, but only one state can be active at any given time. Transitions are made between states, depending on what the FSM designer decides; this is the only way an FSM can change from one state to another.
An FSM has the job of managing and controlling the transitions from state to state, the current state, and its behaviors. Depending on the behavior...