Both. It applies to whomever processes or collects personal data from individuals located in the EU. There are some exceptions for individuals and smaller companies, but it still does apply.
This article is not a substitute for professional legal advice. This article does not create an attorney-client relationship, nor is it a solicitation to offer legal advice.