When an improvement owned by one person happens on land owned by another person, the situation is known as an encroachment.  The laws and court decisions on this subject are complex.  To understand your legal rights in such a situation, it is best to consult an attorney. Preferably consult one with experience in real estate matters.
If you are otherwise on good terms with your neighbor, and if the fence is not in your way, it is probably unwise to start a quarrel over the matter.  In most cases, the actual value of the land involved is very small.  You can ask your attorney about the possibility of creating an easement or license, which can protect your title to the land involved while allowing the fence to remain in place, either temporarily or permanently.  With your attorney's advice, you will also need to decide whether it is necessary and appropriate to do this.