Artifacts are distortions of an image either produced by the CCD, the optical system or compression algorithms such as JPEG.
Images captured in low light are more prone to artifacts, since consumer digicams are not so good at photographing in low light.
Artifacts will also become more visible in big enlargements of a digital image.
A higher resolution CCD is less affected by this, because there are more pixels, while low-end cameras will show artifacts even in small prints because they typically use low resolution chips.
Digital artifacts can be compared to graininess in conventional film, where we see that grain becomes more visible in big enlargements, or in underexposed images.
When saving images in JPEG format certain information is lost in compression. The more heavily you compress, the more information you lose and the more artifacts are created.
JPEG also doesn't handle very noisy images well. Because of the amount of information in a very noisy image JPEG has to throw away a lot of information which introduces yet more artifacts.
Some artifacts can be removed in your digital darkroom, but it's better to try and avoid artifacts in the first place by making sure there is enough light and by not enlarging an image too much.