SOFA stands for Status of Forces Agreement. A status of forces agreement (SOFA) is an agreement between a host country (e.g. Germany, Italy, Japan) and a foreign nation (e.g. USA) stationing forces (military, civilian and contractor..) in that country. SOFAs are often included, along with other types of military agreements, as part of a comprehensive security arrangement. A SOFA does not constitute a security arrangement; it establishes the rights and privileges of foreign personnel present in a host country in support of the larger security arrangement.
Sometimes a SOFA stamp is placed in person's passport. It's a document or stamp in your passport that shows you are stationed in a country and covered by the Status of Forces Agreement. The SOFA stamp registers the person and identifies them as having protections and rights under our SOFA agreement.
The SOFA may cover issues like entry and exit into the country, tax liabilities, postal services, or employment terms for host-country nationals, but the most contentious issues are civil and criminal jurisdiction over bases and personnel.
Some SOFAs may restrict your eligibility to use the military Exchange facilities in a country (e.g. retirees cannot utilize the Exchange or Commissaries in Germany). Overseas Exchange privileges can be found at http://www.aafes.com/exchange-stores/overseas/
Some SOFAs may govern entry procedures into a country when traveling Space-A (e.g. non SOFA personnel arriving at Misawa, Japan have to turn in their passport to the security forces and are not allowed to leave the base until the custom officer comes to Misawa to stamp your passport (possibly the following duty day).