Either via a separating column or by fractional distillation.
Since water and oil have different densities, they are immiscible in each other and the oil would settle on the surface of the water. The separating funnel can be used to drain water from the bottom or to decant oil from the top. This method might not give very pure separated samples.
Another method is fractional distillation. Water has a lower boiling point than oil and is more volatile. When a mixture of both is heated at 100degC, water boils, rises through the column and condenses as collected distillate. Oil would only evaporate and fall back into the mixture when it condenses on the column.
The oil can be collected after all the water have been removed from the mixture.