Short answer, you can't easily.
The JPEG is just meaningless pixels to the computer. Its a raster image. It doesn't know what is a "piece" and how the image is layered up, its just a grid of different coloured dots.
Clip-art are vector images. This means they're drawn and saved in such a way (using vectors!) that object of the image are saved separately and layered up, thus you can edit them easily as you've found out. Another advantage of vector images is they can scale indefinitely without losing quality.
Read through some of these...
http://www.graphicdesignforum.com/forum/showthread.php?t=41
http://en.wikipedia.org/wiki/Raster_to_vector
HOWEVER, the open source program Inkscape (http://www.inkscape.org/) is able to perform some Raster to Vector conversion which does work, but the quality of results depends hugely on the detail of the scanned image (less detail = more likely to be good). You can play with the thresholds, etc.