As a beginner just got stuck in between creating something cool please can someone suggest me out what exactly millis() function used for i read about it but didn't get any idea of it at all
What are you trying to do?
The millis function returns (roughly) the ammount of milliseconds since the arduino was last reset. It rolls over after about 50 days...
See the Blink Without Delay example in the IDE.
The demo Several Things at a Time is an extended example of the BWoD technique.
Think of millis() as the Arduino equivalent of the clock on your wall.