There is a way to tell, but it isn't magical. The shape of a quartz crystal is fairly distinctive. Quartz grows in the shape of a six sided prism terminated with a six sided pyramid. Quartz is also very brittle and frequently displays conchoidal fractures within the crystal structure. For those of you that don't know what conchoidal means, it is the type of fractures that are round and shaped like concentric circles (like you'd see in a chipped pane of glass).
Keep in mind that there are many different types of quartz. Mostly distingiushable by their different colors. Violet quartz is called amethyst. Pink is called rose quartz. Yellow quartz is called citrine. Gray-brown is called smoky quartz. I have also seen green quartz, though it is more rare.
Other types of crystals can be used in magic but they are usually easily distinguished by their shape. Fluorite crystals have a nice octahedron shape to them (like two pyramids glued together at the bottoms, 8 sided with triangle faces). Fluorite comes in a variety of beautiful pastel colors usually somewhere in the green or purple range. Tourmaline has trigonal prism shaped crystals (similar to quartz but with 3 sides rather than 6) and comes in every color of the rainbow. Many other types of crystals may be used but these are the most common that I can think of off the top of my head.
It gets trickier to identify quartz because the six sided prism shape is very popular due to it's ability to channel energy and direct it. Therefore sometimes other stones are actually carved into this shape, but they aren't quartz. Here are a few tips for identifying a true crystal from a stone that has been carved into quartz crystal shape.
1: True quartz crystals usually have fractures within them, only very rarely are they completely clear all the way through.
2: Quartz crystals are translucent (see through) not opaque (non-see through and colored). Lower quality quartz can be opaque but that is usually a quartz stone not a quartz crystal.
3: If a crystal structure is very very smooth and perfect it probably is NOT a true crystal. Quartz crystals grow naturally and thus have natural imperfections. Carved crystal shapes are polished with jeweler's rouge and therefore are very smooth on their sides.
I hope this helps. Long answer to a short question, but identifying crystals isn't a simple science.