please help me in fixing it...I have followed the steps very accurately from the tutorial but I don't know why its been like that...
I downloaded the blend file to take a look. As I suspected, it's a simple case of "Z-fighting".
At this stage the icing is single-face thin. We can see that with subdivision applied it's going through the doughnut mesh. The places with the glitches seem to be places where the icing and the dough mesh faces are overlapping in the same place, so the 3D software doesn't know which one to render "on top" and some glitches appear. If you will add a solidify modifier you don't need to worry about it because the icing will have a thickness and the visible faces won't overlap with the dough.
If not, you can just move up the verts in the parts that are clashing to avoid overlapping faces.
Move the verts up a bit:
Or just add a solidify modifier: