Gas can be removed from the top of the drum by virtue of being gas. Oil and water are separated by a baffle at the end of the separator, which is set at a height close to the oil-water contact, allowing oil to spill over onto the other side, while trapping water on the near side. The two fluids can then be piped out of the separator from their respective sides of the baffle.
The Separator will only achieve bulk separation. The smaller droplets of water will not settle by gravity and will remain in the oil stream. Normally the oil from the Separator is routed to a Coalescer to further reduce the water content.