Are you familiar with state machines? If not, google it, and maybe learn about state diagrams as well.
The only way to go between states in state machines (and SWF) is through transitions. If you're transitioning from a view-state, then the transition is likely invoked through a button or form submission. When transitioning from any other state, the transition is likely triggered through the evaluation of some expression (using the evaluate action), or is an unconditional transition (a transition without an "on" attribute). Some transitions do not transition from the state (usually found in view-states), but most transition to other states.
Actions come in a few types (set, evaluate, render) and can appear in many places. Set actions typically set values on attributes, or set attributes into scope. Render actions are used to tell SWF which sections of the page to update with AJAX. Evaluate actions typically evaluate some expression or make a method call on an object. Actions can be triggered at the start or end of a flow, on entry and exit of states, on render of a view-state, and within transitions.
My guess is there are probably two cases which might be confusing you. The first uses an action-state, which uses the result of an evaluate action to drive a transitions to a different state:
The outcome of the doStuff() invocation (in this case, a String) is compared to the events handled by the transitions. If the returned String is "success", it invokes the first transition, and if it's "failure", the second. Comparisons to invoke transitions are usually done with Strings, ints, and booleans.
<transition on="success" to="theNextState"/>
<transition on="failure" to="aPreviousState"/>
The second case is programmatic validation of a form submission. It's worth pointing out that when an evaluate action appears inside a transition, that if the evaluation is false, then the transition is cancelled and the remaining actions are not performed:
The transition event can be whatever you want, as long as you're consistant between what's on your page and what's in your flow. The expression to evaluate can be just about anything, it's just a method call on some object in scope.
<transition on="submit" to="nextState">