In this picture:

(the pic is rattlebars)
The driveshaft is the shaft sticking out of the rear end. The pinion cup is the cup it's stuck into.
The shaft just pulls out (may have to tap the cup with a hammer while pulling). Look for worn splines. If so, always replace the shaft and cup together. The cup is held on with a nut inside it. You'll need an impact wrench to spin it off if you need to replace it. Not necessary to remove if you're just inspecting.
If not worn, don't bother replacing...but my experience is if this is not checked/cleaned at each tire change or 10,000 miles, that it is likely worn.