Consider a wavefunction $\psi(x_1,x_2)$ which describes a two-particle system. We interpret $|\psi(x_1,x_2)|^2 dx_1 dx_2$ to be the probability of finding particle $1$ in the interval $[x_1,x_1+dx_1]$ and particle $2$ in the interval $[x_2,x_2+dx_2]$ if we perform a simultaneous measurement of their positions.
One might ask if $|\psi(x_1,x_2)|^2 = |\psi(x_2,x_1)|^2$, and in general the answer would be no. For instance, consider two non-interacting, spinless particles in a square well of width $L$, which might exist in the following state:
$$\psi(x_1,x_2) = \frac{2}{L} \sin\left(\frac{\pi x_1}{L}\right) \sin\left(\frac{3\pi x_2}{L}\right)$$
One can plainly see $|\psi(x_1,x_2)|^2$ that the probability of finding particle $1$ in a small neighborhood of $L/2$ and particle $2$ in a small neighborhood of $L/3$ is zero, while the probability of finding particle $1$ in a small neighborhood of $L/3$ and particle $2$ in a small neighborhood of $L/2$ is not. This must mean that they are in some way distinguishable. Otherwise, it would be unphysical to ask which particle was where - we could only ask "what is the probability that one of the particles is in a small neighborhood of $L/3$ and the other is in a small neighborhood of $L/2$?" If swapping the particles changes the probability distribution, then apparently there was something different about them!
If the two particles are indistinguishable, these probability density functions must be invariant under particle interchange - meaning that $|\psi(x_1,x_2)|^2=|\psi(x_2,x_1)|^2$. As a result, we must have $\psi(x_2,x_1) = e^{i\theta} \psi(x_1,x_2)$ for some real number $\theta$.
Experimentally, it is found that in most cases, quantum mechanical particles fall into two camps - those for which $\theta = 0$, and those for which $\theta = \pi$, called bosons and fermions respectively. The Spin-Statistics Theorem demonstrates (with some fairly mild assumptions such as relativity and causality) that these are the only two options, and that particles with integer spin have $\theta=0$ while particles with half-odd-integer spin have $\theta = \pi$. It is worth noting that this theorem holds only for $\geq 3$ spatial dimensions, and much different behavior can be seen in 2D systems.
Lastly, note that I cast the idea of distinguishability in terms of position-space wavefunctions and the associated probability density, but this is not necessary. The state of the system can be expanded in a basis for any observable, and the indistinguishability of the particles amounts to an invariance of the corresponding probability distribution under particle interchange.
If, for instance, the probability of particle $1$ having energy $E_A$ and particle $2$ having energy $E_B$ is not symmetric under $1\leftrightarrow 2$, then there must be something distinguishable about them. In the case of indistinguishable particles, it is only physical to ask for the probability of one having energy $E_A$ and the other having energy $E_B$.