Each refinery you build produces enough refinery ships to work at each extractor in the same grav well and all extractors 1 jump away. Each extractor at a colonized planet can support 3 ships working it (so 3 refinery structures) and neutrals can support 4.
So unlike trade ports, you shouldn't be building refineries everywhere. If you have a good cluster of connected planets, dropping 3 refineries on one of them can get you extra resources from 3-4 other planets if you're lucky.
The Advent don't have a dedicated refinery structure, their trade port researches an ability to switch to refinery mode - doesn't service nearby planets, but it beefs up extraction at the current planet considerably.