* Oil is a liquid and specifically a nonpolar liquid. This means that its molecules don't have a positive and negative end, and they don't mix well with water (which is polar).
* Vinegar is also a liquid, but it's a solution of acetic acid in water. Acetic acid is a polar molecule, making vinegar also polar.
Since oil is nonpolar and vinegar is polar, they don't mix together. They form two separate layers, with the oil floating on top of the vinegar.