It uses Google's index, among others.
Being able to personalize your own search is truly the killer feature, though, in a couple of ways.
The first is as you point out: being able to "edit your own algorithm" is really nice. I don't have to try to "train" Google's algorithm to show the results I want, and it's very easy to say "I never want to see this site in my results again". I'm still shocked Google doesn't have that feature even as some kind of client-side Javascript.
The second is Lenses. It's so obvious in hindsight that a singular algorithm is insufficient for search. Nobody wants or needs their searches for porn to impact their searches for technical documentation, or vice versa. There are more nuanced examples, but that's the most obvious (also, I don't think Kagi indexes NSFW content or at least I haven't seen any).