Why a US company can fall within its reach
The GDPR is a European Union regulation, but its territorial scope, set out in Article 3, is not limited to companies with offices in Europe. Broadly, it can apply to an organization outside the EU when that organization offers goods or services to people who are in the EU, or monitors their behavior there.
That second limb catches more businesses than people expect. Tracking how visitors from Europe use a website, profiling them for advertising, or analyzing their behavior inside an app can all be forms of monitoring. Offering goods or services is judged by intent and context: a site that takes euros, ships to Paris and has a page in Italian is plainly aimed at Europeans, while a site that simply happens to be reachable from Europe may not be.
A US company can also come within the regulation because it has an establishment in the EU, such as a subsidiary, a branch or staff on the ground, and processes personal data in the context of that establishment's activities.
Controllers and processors
The GDPR distinguishes between a controller, which decides why and how personal data is processed, and a processor, which handles personal data on a controller's behalf. Many US service providers are processors for European clients, and those clients are required to put a written contract in place that sets out the processor's obligations. That is why a European customer's request for a data processing agreement is often the first time an American vendor meets the regulation.