My answer only deals with the "human" forms in the differentiation, that is to say: there is no software, only their eyes and hands.
If I do not have any reference (as in: you blind me, you adjust the focus distance and then I can only look through the viewfinder, but I can not change anything), the answer is: it depends on what you can see.
Take, for example, an alley of trees: one in front, one where the subject is, and another in the distance. When I see that the subject is not clear, I can try to determine if the tree in the foreground or the one in the background is more focused.
If I do not have any reference, for example, as Yaba mentioned, when taking a picture of an airplane with a blue sky in the background and without a foreground, then I have no way of knowing exactly (my opinion would be that the focus is too close, however, as the planes tend to be somewhere near infinity).
The easiest way to find out is usually to change the focus slightly and see where it is (again, this works better with a reference than without it).
But, in general terms, there is no sure way to differentiate: a too short focusing distance does not lead to (fuzzily) different blurring compared to a focusing distance that is too long.