You can indicate an event that causes a transition to occur (a trigger event) and the computation (the action) that executes and makes the state change happen.
To
add events and actions you write them near the transition line, using a slash to separate
a triggering event from an action.
Sometimes an event causes a transition without an associated action, and sometimes a
transition occurs because a state completes an activity (rather than because of an event).
This type of transition is caled triggerless transition.
Also possible is a guard condition.
When it's met, the transition takes place. (For example screen saving mode is activated
when time interval of n idle minutes has passed).
Some of the states may be more complex that is represented with a rounded rectangle. It is possible to have states inside one state. These states are called substates (sequential and concurrent).
Sequential
substates come in sequences of states which occur one after another.
Concurrent substates must consist of two or more sequential substates which occur
at the
same time. This is represented with dotted line between the concurent states.
If you have any problems understanding these concepts please refer to the State Diagram - Example lesson.
The UML supplies a symbol that shows that a composite state remembers its active
substate when the object transitions out of the composite state. The symbol is connected by a
solid line to the remembered substate, with an arrowhead that points to the substate.
A message that triggers a transition in the receiving object's state diagram is called a signal. In the object-oriented world, sending a signal is the same as creating a signal object and transmitting it to the receiving object. The signal object has properties that are represented as attributes. Because a signal is an object, it's possible to create inheritance hierarchies of signals.