CV joints can go quite a long way without any sort of problem. They generally fail in two ways: they wear out or the boot gets damaged and dirt is caught in the grease which then leads to abrasive destruction of the balls and the journals. Many times the driver's side CVs, fail first due to their proximity to the heat rising off of the exhaust.
There are essentially two ways to deal with a faulty CV. One, you can remove and replace just the defective joint or you can replace the entire axle shaft (sometimes referred to as a "half shaft"). Replacing the entire half-shaft is easier and more common but also more expensive. If you're going down this road the first potential trap is with the replacement parts: many times bargain priced half-shafts are "rebuilt" using old CV joints instead of new ones. How is this done? The "rebuilder" repairs the CV by filling in worn areas of the knuckle (welding) and then re-machining the knuckle's journals. The problem with this is that the machine work is often crudely done and the knuckle surfaces are not as smooth as they should be - the result is a noisy CV.
Luckily this rebuilding process seems to be fading now and most rebuilt half shafts are done by simply replacing the old CVs with new ones.
Another reason to replace an entire half shaft is because replacing individual CVs is a messy job. Why? The moly grease softens the skin and cuts to your fingers and hands seem to happen more readily. If at all possible, I resist taking apart the CV as getting them back together somewhat similar to a Rubik's cube. To get the CV off of the shaft though, you may have to take the CV apart and then use a puller to separate the knuckle from the shaft.

Above you can see I have the half shaft off of the car and am removing a snap ring.

With the ring out of the way I can use a puller to separate the CV "knuckle."
There is an old trick that some swear by. Basically the idea is swap the right and left half shafts. This seems to have some merit as the wear that occurs to the knuckle happens at the leading edge of each journal. This is easily seen if you examine a CV. So, swapping the half shafts (right to left and left side to right) results in altering the wear point within the CV.
Here is a broken cage, this happened during a wheel bearing change because I allowed the weight of the disconnected axle shaft to hang (without any sort of support) and that overstressed the inner CV.

Porsche has been using this same CV for a number of years dating back into the mid-year 911s. There are slight variations in thickness, which means the CV bolts vary from model to model too. The bolts themselves are also a little interesting. In the mid-year 911 days (mid 70's) Porsche used a hex cap socket head cap screw. For some reason, they switched away from those to a triple square socket head cap screw. There are six per CV. A set of 24 new bolts costs about $25 but if one strips, the $25 will seem low. The tripple square bit seen below is the preferred due to its length, which allows you to keep the bit square to the bolt head and thereby minimize stripping. These bits are also sometimes referred to as serrated bits.
