Beginning students of archaeology are usually supervised very carefully in order that they do not throw precious evidence away as they are digging - a fragment of pottery or corroded coin can often look just like a lump of dirt or small pebble. One way to prevent missing artifacts while digging is to put the soil you have dug through a sieve. This helps catch the smaller artifacts from being missed out. Experienced archaeologists have a better eye for telling the difference between what is a clod of earth and what is a precious artifact.
Archaeologists get to know the types of soil and how it clings to pottery or bone.
I guess a lot of being able to tell the difference between an artifact and the ground in which it is found has to do with experience and having a good eye for detail. In time, however, experience is the best teacher of all, and expert diggers learn to recognize the difference in shape, color and texture between natural lumps and stones from man-made objects.