The usual workshop disclaimers apply, if you are not sure or don't have the tools don't do the job, this is a vital component on your car. If not done correctly the front wheel could just plain come off.
Seems to be a common problem with our cars so I thought I would post this to give a guide.
First apply the handbrake, "crack" the wheel nuts on the side you are doing and then jack the car up and support on an axle stand. Use the wheel "chock" (foldable wedge thing from the toolkit) under the opposite rear wheel. Jack up the opposite side front so that the tyre is just clear of the ground (This allows you to turn the steering freely if the steering lock is off). Remove the wheel.
Step 1 - With the steering lock off move the wheel to full lock with the front of the wheel outside the arch and remove the ABS sensor.
It can be a pig to get out as the grease makes a seal, just rotate and work at it and it will come out, tuck it away at behind the ABS sensor cable at the front of the suspension strut. Once removed I put the bolt back in so as not to lose it!
Next centre the steering and engage the steering lock, locate the 2 bolts underneath that hold the hub assembly to the ball joint/steering arm this is the one at the rear and there is a similar one to the front of the pivot.
Use a long "breaker bar" to crack the bolts.
Get some rope and tie to the top of the coil spring, remove the bolts and lift the whole hub assemble off the spigots and support with the rope ensuring that you put no strain on the flexible brake pipe. (In this pic you can see the ABS sensor coming off the clamp bracket on the suspension strut)
Remove the split pin and nut from the track rod end, I put it back on upside down to protect the thread during the next stage in case the ball joint splitter slipped. (Note the WD40 all over the place here)
Use a ball joint splitter to remove the track rod end. It will probably go with a loud bang so be be prepared, it will be noisy but not damaging.
Remove the split pin from the ball joint main nut. Use that long breaker bar to crack the nut..
Then remove the nut and the track rod.
Ball joint splitter comes into play again, you may need to hammer the "fork" to get it in place. Looks easy but I had to use a good fashioned fork and hammer to get this one out.
Put the new ball joint in and torque to 123Nm
If the split pin won't go through tighten or loosen the nut the least amount possible until you can get a new split pin through the hole. I always prefer to go tighter if it is 50/50 on the nearest slot.
Replace the track rod end and torque to 54Nm, same again for the split pin (always use a new one, an assorted box is a couple of quid from Halfaruds)
Replace the hub assembly ensuring that it engages on the spigots on the ball joint arm
Replace the hub assembly bolts and tighten in turn to a torque of 113Nm
Replace the ABS sensor and the wheel nipping up the wheel nuts, drop the car back to the ground and torque the wheel nuts to 105Nm in a "diagonal" pattern.
Don't forget to check the wheel nuts after a few miles and it is job done :