In general, when we modelise attack, we have to consider more than one phase.
Problem : In theoretical computer science, we use Turing machines $\mathcal{A}$ (eventually with oracles), which are "one-phase" (takes a string as input, and output another string).
Then to consider this, people choose to use more than one Turing Machine for example $\mathcal{A}_1$, $\mathcal{A}_2$.
Thus $\mathcal{A}_1$ will represent the adversary during the first phase, and $\mathcal{A}_2$ during the second phase.
But, it could happen that $\mathcal{A}_2$ needs to use information computed during the first phase.
That's why we use a string (ponyomialy bound, because $\mathcal{A}_1$ is considered as a polynomial-Time Turing Machine), which is output by $\mathcal{A}_1$, and takes as input by $\mathcal{A}_2$. This string is called the state.
About the internal coins, it's just because the $\mathcal{A}$'s are probabilistic Turing machines, thus it uses random coins. (internal means : it doesn't depend of the input).
ps : Sometime, people want to avoid to use more than one Turing-machine, and consider stateful Turing Machine (opposite to the traditional stateless Turing machines).
pps : In this context, stateless doesn't mean there in only one state in the Turing Machine, but it means that each execution is independent of the previous ones, and thus depend only of the inputs, and the random coins.
https://www.thegeeksclan.com/stateful-and-stateless-programs/