If you configure unbound per the instructions at FTLDNS and Unbound Combined For Your Own All-Around DNS Solution, unbound will be your local recursive resolver. It will go to the appropriate authoritative servers to find the IP for the domain (replacing a third party DNS service).
Pi-Hole then uses unbound as it's resolver.
The path: Client requests DNS --- Pi-Hole processes request from cache/blacklist or asking unbound --- unbound finds the address and sends it back to Pi-Hole --- Pi-Hole returns it to the client.
If you don't use unbound for this and use Google as your upstream DNS server (for example), in the path above substitute Google DNS for unbound.