Basically, the previous posts have correct information, but here is a little more info that I just happen to know from being an installation supervisor about 20 years ago:
Primer is absolutely required to chemically complete the bond between the PVC pipe and/or PVC fitting molecules and the PVC glue itself. Without it, the bond will typically fail 10 to 100 times earlier than with primer. Primer is terribly toxic and should be not breathed or gotten onto your skin if at all possible. I know installers who thought it was good hand-cleaner!! It is if you don't mind wrecking your liver before you're about 30 years old!
Most primer is purple, but it is also readily available clear and occasionally in other colors like blue and red. One reason to use clear would be if you were using it for an application such as building PVC furniture where the extra purple stains are almost unavoidable and are highly undesireable. Otherwise, for virtually 100% of plumbing applications the purple is better since you can tell how much and where you've put it much easier to get the application correct.
For those of you who are environmentally-minded, primer is very toxic to all bugs and critters who live in the ground along with your pipes and valves and such. Not only that but I promise that it's best to keep it out of our groundwater everywhere-- this is a no-brainer!! Be very careful not to spill it at all by using an additional "carrier" such as a tray or box that doesn't leak. If you are really diligent you can put old rags or newspapers under your work area to catch drips of primer and glue, too, which is also toxic but not near as bad as the primer. By the way, when the chemical bonding is complete and the pipes and fittings have cured 100%, to my knowledge normally there is no longer danger of instant contamination of the immediate surroundings under normal conditions/circumstances and all the products have become virtually inert, as the pipes and fittings were to begin with. It's also a good idea when using/handling PVC primer and glue to use a chemically impervious pair of gloves such as nitrile health care gloves or other specially chemically-resistant gloves usually available at hardware stores or grocery stores or online there is an amazing diversity of these products at www.gemplers.com. If you happen to get some primer or glue on your bare skin, you want to wipe it off quickly and as thoroughly as possible with a cotton rag or cloth or paper towels. Other than regular soap and water and gentle scrubbing, I know of no product(s) designed to remove PVC primer and glue residue from human skin or tissue, so it pays to pre-protect yourself and use great care and caution during handling and installation of these products. People with severe skin allergies or overly sensitive skin might want to consider not doing this type of work themselves, but instead get a good installer who has the experience to deal with this normally, although I've seen enough bozos in my time to know this isn't a guarantee just because he/she says they're a "very-experienced" installer. But, it'll be their liver not yours that gets cooked.
I hope this information helps lots of you out there, but don't let it ever discourage you from using primer-- it is absolutely necessary for good PVC bonds and no good system will be found without it (without it, pipes and fittings will "blow-out" occasionally out of the blue as if you'd used nothing on the joints at all, who knows, maybe at 3 am?). That being said, it is not needed, of course, for other products like poly-tubes and barbed fittings, it is only used for PVC and CPVC and related products-- always consult the supplier you are purchasing from, because they will know for sure whether the pipes/tubes and fittings you are using will require PVC glue, primer or both.
And, there's one more little thing about primer-- never, never use it alone on PVC pipe/fittings for things like softening the PVC threads on a threaded male adapter that will be used screwed into a brass valve, for example, o