What would cause a 2002 Subaru Forester to periodically make a loud clunking noise around the right front tire?

I had periodic clunking in the front tire of a 94 legacy. I Needed the "Ball joint" replaced. Parts and labor cost a couple hundred bucks. Get it fixed b/c if it snaps youll crash. It typically clicked or clunked as I made turns slowly like out the drive way or into a parking lot.