Adverse possession is a way to establish title to real estate even though there is no deed to the property. A simple explanation is that the person has owned the property but can't locate the proper documents to establish title. So it does not allow the stealing of property as adverse possession requires some claim of title or right of ownership. Typically, the next door neighbor claims the property as annexed to their own. The use by the neighbor could be as simple as growing vegetables every year.
The elements of Adverse possession in Massachusetts are: Possession which is open and notorious, adverse to the interest of other owners, continuous for a period of 20 years or more and hostile to the interest of other owners. Possession means that the person claiming ownership entered and possessed the property. Adverse means that the possession was without the owners consent. Open means that the possession must be done in such a way that the owner should be aware and exclusive. In other words, not in secret and not used by the real owner. Mowing the lawn is generally not done in a way that excludes the owner from using the property. A vegetable garden can be exclusive. The use must also be hostile which means without the permission of the owner.
If there is a possibility of a claim of adverse possession, then it is a good idea to take steps to prevent the claim. However, you don't want to alienate the neighbor because then you won't get the free vegetables. There are several things you can do if a neighbor is using your land. The choices depend on your current relationship with the neighbor and the future relationship. You can hire a surveyor to place markers to define the boundary. You can post no trespassing signs on the property and send a letter to the neighbor. If the neighbor continues to use the property, you may have to sue him for trespass.
Since one of the elements of adverse possession is that the possession is hostile, then adverse possession can be stopped by giving permission before 20 years of usage has occurred. Permission may be verbal or a note delivered to the neighbor. However both of these can be issues at a trial if the neighbor forgets about the permission or lies. A better choice is to grant permission in a way that it can't be disputed at trial.
My preference is to record a license at the Registry of Deeds. Once a document is recorded at the Registry it is considered notice to the world and can't be disputed. If the permission is in a document recorded at the Registry then there won't be any factual contest at trial. There will be no dispute about what was said. A license is permission to use the property and is revocable at will.
If your neighbor is using a portion of your property you should consult a real estate attorney about granting a license and protecting against a claim of adverse possession in the future.