Four placements, four data paths
In-browser: the rules ship with the page and execute on the visitor's machine. The content never leaves the tab, and there is no copy to retain, no subprocessor to list and no retention default to negotiate.
On-premise: software runs on your own infrastructure. The data stays inside your network, but you now own the deployment, the updates and the rule set versioning.
Private cloud: an isolated tenancy at a vendor. Strong contractual controls, and the analysis still happens on somebody else's hardware, which means a copy exists.
Vendor-side processing: the common case. Content is uploaded, analysed and may be logged. Workable for public material, awkward for anything under NDA.