A pool works by submitting to it, along with the address prefix, a normal public key that you have generated. You also generate its corresponding public key.
In the vanity generation process, every time you inspect a searched private key, you compute its public key, you
combine it with the public key you provided and then you do RIPEMD160/SHA256 and base58 encoding on that result, and only then comparing the result with your prefix.
Then for the resulting private key you get, you combine it with the private key of the submitted public key, to get the private key that corresponds to the public key listed in the results.
The combination process could be anything, but it's usually addition or multiplication because that's what bitaddress.org supports.
I'll attach an image soon, I'm in the process of making it and it should make things easier to understand.
edit: