Where is the materials of comet after it crashed into the sun? If a comet crashes into the sun, where will the substance (eg: water,silicon) be? Will they be inside the sun? Or they will be ejected from sun again?
It depends on the size of the comet. If it's only $0.1$–$1\,\mathrm{km}$, it will evaporate before even reaching the Sun (Li. et al. 2013; Knight &amp; Walsh 2013), and the released gasses will be ejected by the Sun's radiation pressure. Larger comets, so-called Sungrazing comets, can survive close passages, although they probably will be torn apart by tidal forces.

If the comet comes so close that it crashes into the Sun (I'm not sure this has ever been observed, despite various blogs discussing this, but there's no reason it couldn't happen), it would reach the escape velocity of the Sun, i.e. $\sqrt{2 G M_\odot / R_\odot}\sim600\,\mathrm{km}\,\mathrm{s}^{-1}$. This New Scientist article claims that the impact would cause an explosion and possibly a coronal mass ejection, but the underlying scientific article by Brown et al. (2015) seems to indicate that the large ablation of the comet will result in less dramatic velocities.

Anyway, some of the released gas would stay at the surface of the Sun, just like some of the Sun's "own" gas stays. And since the convection cells, or granules, are quite shortlived (of order 10 minutes; Bahng &amp; Schwarzschild 1961), the gas will soon be engulfed by the Sun, being carried deeply into the body of the Sun.

The convective zone of the Sun is in the outer ~30% of the radius, and there isn't much mixing of material between that and the inner, radiative zone. In the last phases of the Sun's life, however, when core hydrogen burning stops and the Sun becomes a red giant, convection reaches so deeply into the Sun that some mixing takes place. This is called dredge-up. Eventually, roughly half of the Sun will be ejected due to the large mass-loss during the red giant phase, while the other half becomes a white dwarf. If the dredge-up didn't happen, the comet material would all be a part of the ejected material, but due to the dredge-up, some of it will end up in the white dwarf.