Ariyan Javanpeykar said here in comments that,

$X\times_{\mathcal{X}}X$ being a scheme is equivalent to representability of $X\rightarrow \mathcal{X}$.

Context is as in this question.

Suppose $p:X\rightarrow \mathcal{X}$ is representable, then, for any scheme $M$ with a map of stacks $M\rightarrow \mathcal{X}$, the $2$-fiber product $X\times_{\mathcal{X}}M$ is a scheme. In particular, we can take $M=X$ then, $X\times_{\mathcal{X}}X$ is a scheme. Thus, $p:X\rightarrow \mathcal{X}$ is representable implies $X\times_{\mathcal{X}}X$ is a scheme.

Suppose it is given that $X\times_{\mathcal{X}}X$ is a scheme. Then, I want to see that $X\rightarrow \mathcal{X}$ is representable i.e., hen, for any scheme $M$ with a map of stacks $M\rightarrow \mathcal{X}$, the $2$-fiber product $X\times_{\mathcal{X}}M$ is a scheme. I wanted to write something like $X\times_{\mathcal{X}}M=(X\times_{\mathcal{X}}X)\times_X M$. But it does not make sense as there is no map $M\rightarrow X$.

any comments on how to see this are welcome.