Like Dissolves Like
The basic principle that determines whether a substance will dissolve in another is "like dissolves like." This means that if the molecules of the two substances share a common chemical property, one may dissolve in the other. Otherwise, it will not. This forms the basis for the answer to the question, "why does salt dissolve in water but not in oil?"
Why Salt Dissolves in Water
Salt or sodium chloride consists of sodium and chloride ions joined by an ionic bond to form a charged NaCl molecule. Water consists of two hydrogen atoms and one oxygen molecule connected by a covalent bond to form a charged H20 molecule. The biggest similarity between these two substances is that their molecules are charged, making them reactive. This is why salt dissolves in water. As salt is mixed into water, the charged water molecules interact with the charged salt molecules. The opposing charges within each molecules pulls them apart, thereby resulting in the salts solubility in water. As the molecules are broken apart, the positive ions of the hydrogen in water are attracted the negative chloride ions in salt, while the negative oxygen ions are attracted to the positive sodium ions. The sodium and chloride ions mix uniformly with the surrounding water molecules and thus salt dissolves in water, forming a homogenous (evenly distibuted) mixture.
Why Salt Does Not Dissolve in Oil
Oil molecules do not contain any charge. Oil is comprised of long chains of hydrogen and carbon atoms linked to each other. It does not contain any net charge making it nonreactive. So, salt and oil are not "chemically alike." One is charged, the other is not. As a result, when salt is added to oil, no bonds are broken. Salt and oil simply do not mix. When combined, they remain distinctly separate.