the short answer: it's using an atom defined in applet.clj
It's a function defined in core.clj on line 17 which extracts state information stored as an atom attached to the metadata on the applet. Set state start by finding the atom that stored the current "state" by calling (:state (meta (current-applet))
which extracts the metadata (which is a map) form the applet object, then returns the atom stored in the :state key. It then calls reset!
to put a new value in this atom.
It gets included by the (:use quil.core) in the ns
declaration.