A (instance) state is a configuration statement of an instance. It is defined at the stack's design phase, and applied to the instance at the runtime. A state should be idempotent, as during the lifecycle of the app the app's state is consistently maintained. The state drift will be automatically fixed, so the app will always run in the desired state. (If you are familiar with other DevOps tools, such as Puppet, you may find that a state is similar to Puppet manifest)
The complete state modules can be found here.
The states editor is compatible with the Jinja syntax.
You can check out the SaltStack documentation about the Jinja renderer for more details about it.