In the Berkeley lecture by Scholze, an $X$-shtuka over $S$ (usually $\operatorname{Spec}\bar{\mathbb{F}_p}$) is defined to be a rank $n$ vector bundle $E$ on $S\times_{\mathbb{F}_p}X$ together with a meromorphic isomorphism $\operatorname{Frob}_S^*E\to E$ (presumably meaning an isomorphism except for a codimension $1$ subscheme) which is defined on a subset that is fiberwise dense in $X$. It is stated that the $\ell$-adic cohomology of the moduli stack of shtukas can provide a global Langlands correspondence for function fields.
How does one understand this notion of shtuka? What does the pullback of Frobenius look like? Why is it defined this way?