Why do some salad dressings separate into 2 layers?

because most salad dresings are made up of vinegar and oil and since vinegar is water based it dose not mix with oil.Water molecules are dipolar, so they have one end that is partially positively charged (the hydrogens) and one end that is partially negatively charged (the oxygen). When you get a bunch of water molecules together they form a transient network of hydrogen-bonds, short-lived interactions between the oxygen of one water molecule and the hydrogen of a neighboring molecule. These hydrogen bonds explain water's unusually high boiling point, its decrease in density upon freezing, and its unusually high surface tension.

Oil is made of long hydrocarbons, which are nonpolar. Nonpolar molecules don't really have much incentive to stick to each other. They do experience very weak attractions called van der Waals forces when they are close to each other, but these are common to all molecules.

When you try to mix water and oil together the water "wants" to satisfy its hydrogen bonds. This is best done by sticking together with other water molecules. The hydrocarbons don't really "want" water there or not, but are happy to exclude water if it "wants" to go somewhere else. The result is a biphasic mixture. Oil ends up being the top layer because it is less dense than water, but there are also nonpolar liquids that are more dense than water, and in that case the aqueous phase would be the top layer. Sometimes the two densities are close enough that which one ends up being on the top is a matter of what else is dissolved in each solvent (seen sometimes in aqueous extractions with chloroform or dichloromethane--always check to make sure you've got the right phase before dumping the rest down the drain!)