Homemade oil and vinegar salad dressings - vinaigrettes - are technically called temporary emulsions. This means that the oil and liquid, which naturally wouldn't join together, can be temporarily interspersed within each other by rapid whisking or shaking. But because there's nothing really holding the oil and water droplets together on a chemical level, they eventually separate back out again.
Commercial salad dressings are usually made with a lot of additives and emulsifying agents that keep the vinaigrette from separating. Some of them are natural, like lecithin (found in egg yolks). Others are, shall we say, not quite so natural.
If you want to keep your homemade vinaigrette from separating so quickly, you can slow things down by adding other ingredients like mustard, black pepper, or dried spices. You can even suspend it permanently by whisking in an egg yolk. These other ingredients also make the vinaigrette thicker and creamier.
But rest assured, it's perfectly normal for vinaigrettes to separate and doesn't mean that anything has gone wrong!
What's your favorite kind of vinaigrette?