Let’s see for ourselves. You will need an empty container like a soda bottle, water, food coloring and cooking oil. Pour about ¼ cup of water into the empty bottle and then add a few drops of food coloring. Then add about ¼ cup of cooking oil to the bottle. Screw the lid on tight and shake the bottle as hard as you can. Take a look. It seems, initially, that they might have mixed but let it sit for a bit. Watch them begin to separate and watch the oil up to the top.
So what’s going on? Water molecules are strongly attracted to each other and oil molecules are also strongly attracted to other oil molecules. They just don’t want to mix together. They stay separated and the oil floats to the top because it has a lower density (meaning the molecules are less crowded and are lighter).