Sodium chloride is polar molecule. electronegativity difference between sodium and chlorine gives polarity to the sodium chloride molecule. mostly polar molecules will soluble in polar solvents and insoluble in non-polar solvents. non-polar molecules will soluble in non-polar solvents and insoluble in polar solvents.
water is polar solvent and kerosene is non-polar solvent. and thet's why sodium chloride soluble in the water not in the kerosene.