Hi
If its like other XR's I have worked on then it is most likely the O Ring around the Fork Cap - the big nut at the top of the forks.
Probably been damaged when refitted at some stage - need to be careful when putting it back in as the O Ring sits out a bit and can get caught betwen the edge of the fork tube and the fork cap.
If you look at the above picture ( these are from an XL 175 but will be similar ) the black ring is the O Ring I am talking about.
So in answer to your question it is fairly easy to remove and replace.
Put the bike up on a stand so the front wheel is off the ground - takes tension off fork springs
Using the right size spanner / socket undo the fork cap - becarful as it is nearly undo - there will be some tension from the fork springs - keep downward pressure on top of the fork cap as you undo the last part.
Examine and replace the O Ring as required. Make sure you put a smear of oil on the new O Ring to stop it binding as you replace the cap.
When refitting fork caps - becarful as the thread is fine and easily "cross threaded" - start it using fingers - no spanner etc
And use a torque wrench for final tightening - not sure what the correct spec is - check with a dealer or Owners Manual