Basically it lets you run JS code on every request, much like Lambda. Differences:
1. It's JS but not Node.JS - You write against the service worker API and they run it in a vanilla V8. You'll want to webpack your stuff together or something like that.
2. Because it's V8 and not Node, they can run many customers in the same process (as safely as multiple sites can coexist in Chrome tabs), and therefore it's cheaper than Lambda.
3. It runs on the cloudflare edge nodes, i.e. close to the user, instead of some AWS region on the other side of the world, so latency can be lower. Can be, because for many (most?) use cases you'll still need to call some API somewhere else, eating up most latency wins you might make. They do also have a distributed KV store that might help you address this, however.