This is a very difficult distinction to make. In the past, in particular, it has been a distinction that has often been made on the basis of ethnocentrism. Things made by Western people have tended to be classified as art while those made by non-western people have tended to be called artifacts and presented as things of interest to anthropologists.
One less freighted way to look at this is to say that art objects are generally seen as having value in and of themselves. Art is something that is to be appreciated for its aesthetics. By contrast, artifacts are seen as valuable largely because of what they tell us about the societies in which they were made. We do not look at artifacts mostly to admire the way that they are made. Instead, we look at them in order to understand the people who made them.
This, of course, is not always an easy distinction to make. Things like Greek urns or Native American ceramics can easily be seen as both art and artifact. They have aesthetic value, but they also teach us about the societies from which they came.
What this means is that the difference between art and artifact is often in the eye of the beholder. Sadly, the distinction is sometimes made on the basis of ethnocentrism, implying that non-Western people are curiosities to be studied, not artists to be admired.