A State Machine is a type of Behavior that describes how a system or system component (represented by a block) reacts to events or changes in its environment. State machines are typically the classifier behavior of a block; they describe the whole life behavior of the block. 

State machines consist of State, Transitions and Pseudo States.  A state represents a significant and persistent condition of a block.  A block will remain in a given state until triggered to transition to another state.  When the triggering event occurs, the state machine will transition to another state within the region based on the triggers and guard condition specified for the transition.  State machines can invoke other behaviors, including activities, interaction and other state machines.  These behaviors may be invoked from within the state as entry, do, or exit behaviors or during the transition as an effect behavior.  Pseudo states describe the initialization and termination of region and may be used to control the path taken by a given transition.  A state machine is created when creating a State Machine diagram

Specify the State Machine element in the State Machine Specification window.