Why is it difficult to mix oil and water?

Water molecules form a stable network through hydrogen bonds, while oil molecules prefer to be close to each other. When the two are mixed together, they will naturally separate into different phases.

Saponification reaction creates amphiphilic molecules

Heating oil and strong alkali will break the ester bond and generate glycerol and fatty acid salts. Fatty acid salts have one end that is hydrophilic and the other end that is lipophilic, thus connecting two otherwise incompatible substances.

Micelles take away oil and dirt

Many soap molecules will form a spherical structure, enclosing the hydrophobic oil inside, with the hydrophilic end facing the water outside. When flushing, the oil stains leave the surface with the water flow.