Yeah, I spent a couple of hours looking for this info, so just make it easier for anyone running into the same thing.
So, we're specifically referencing getting the yoke with the u-joint that has the CV axle attached to it which attaches to the hubstrut (what the parts manual calls it, the long, vertical thing that holds the strut and bearing and CV joint) oh and before I forget, here is the parts manual for this quad in case you need to look up names of parts: http://pi54.com/corp/manuals/Parts/9917019.pdf
If you need assistance with getting the hub strut detached, here is a video (but it doesn't show you how to get the yoke out of the differential). https://www.youtube.com/watch?v=uaYCd6jiA_I&t=13s&spfreload=10 Yes, I know it says it's for doing a Sportsman, but it's the same setup in that regard, but note the spindle coming out of the hub strut - it is completely different than the one on your Magnum 500.
Now, you got the axle detached, you are ready to pull that sucker right on out of the differential. So, you pull on it and pull and - nothing. That is when my ordeal began and I found that parts manual above and it shows that there is a C clip ON the splined end of the shaft, inside of the differential! Okay, well, a lot of research later - hours worth looking through forums and videos, and I found out that is NOT a C-Clip. That is a spring clip. Meaning, you simply have to exert enough force on the shaft/yoke to force that clip to compress and yes, the shaft will actually come out of there!
Several comments on the forum I finally found about this suggest using PB-Blaster on it and letting it soak - even for days. But, mine wasn't rusted in there, I just didn't know what I was doing. I stuck a steel bar right into where the u-joint is on the yoke, pulled on that while using a huge screwdriver to exert force on the back side of the yoke and it took me all of 60 seconds to get it out. PLEASE NOTE: There is a seal right there where the shaft goes into the differential, do NOT press against that! If you damage it then you have more work to do in replacing that seal!
ASO PLEASE NOTE: I started looking up pricing on complete new replacement shaft (everything on mine is shot, easier to just replace the whole thing) and saw a large number of listing that said it would work for my Magnum 500, but upon observation of the picture, the splines on the CV joint end are not the same on many of them! Almost all of them, actually. The splines on my Magnum are at the END of the shaft, not several inches down from the end, as many of those are showing. Just trying to save you trouble in ordering the wrong part.
ADDING: I found a new set of complete axles on eBay for $114 - under the heading of a 2002 Polaris Sportsman 700. The axles looked the same so I clicked on the compatibility list and saw that the 2002 Magnum 500 on that list. If you are looking to get out of this cheap, this is the type of deal for you, otherwise, you can spend hundreds of dollars on these axles.