Depending on what style you have the details of the procedure is a little different. The overview, is you need to get the axle disconnected from the bearing assy, usually a large nut or with automatic hubs a few lock nuts and snap rings. I Usually split at least 1 ball joint and pull the spindle off and away from the axle, sometime splitting the tie rod off the spindle will help get it out of the way.
If it is a setup like a regular car, sometimes you can just unbolt the bearing and slide the axle out.
Slide out the axle and change the joint(s).
Make sure the grease fitting is accessible when it is re-installed
When you are done the joint should move a little stiff but be smooth.
Artificial Intelligence is no match for Natural Stupidity