I am following a carrot cake recipe for the first time and the first set of instructions are 'to beat the sugar and oil until smooth,' but how smooth is it suppose to be? Is it still going to be slightly grainy or smooth like a baby's bitten with baby oil on it?
The simple answer has to do with how things are dissolved in general. When salt (NaCl) is placed in water, it "dissolves" because all the sodium ions and chloride ions separate from each other and "hide" (become dispersed) within the water molecules. This is an example of an ionic system: Na+ and Cl- interact with the water molecules in a specific way...the positively charged Na+ is attracted to the part of water that is negatively charged and the negatively charged Cl- is attracted to the positive part of the water molecules.
Its the same general principle when talking about salt dissolving in vegetable oil. Vegetable oil is made of lipids: chains of carbon and hydrogen, which are not ionic at all. Therefore there are no places for the ionic sodium and chloride to hide within the lipids. The Na+ and Cl- would prefer to stay with each other where they have nice ionic interactions..the result is that the salt does not dissolve.
Sugar, on the other hand, can have interactions with the lipids. Sugar is composed of carbon, hydrogen and oxygen in a ring structure. It has chemical groups that can interact with the CH's of the lipids AND it also has chemical groups (OH) that can interact with water molecules. It makes contacts with the lipids and slowly starts to hide within the lipid molecules until its so dispersed that you cannot see it in granular form anymore. Due to these properties, sugar can dissolve in both water and in the vegetable oil.