Flow variables are used to set variables that can be accessed anywhere within a flow. The scope of a flow variable is limited to the flow where it is set - it does not persist to the next flow. Variables can be added visually by dragging a variable component into the flow, or via XML. Mule supports flow, session, record, and CORS variables. Record variables store information at the record level during batch processing. Session variables can be used to set variables tied to a message for its entire lifecycle across flows, applications, and servers.