First, the locations are chosen and actors are assembled. Then the movie is shot, with many takes for each scene. Then everyone goes home and let the music directors and editors go nuts with it. Once the music sequences are finalized and all the scenes are selected, 90% of which will go on to become the final print, the phone rings in the lead actor's house first.
He gives a date and on that date the whole movie is played over again, but this time all the music, voices, noise are muted; the actor is given the whole script and while watching the film being played in front of him, he has to re-act those dialogues again. This process is called voice-over. Once he's done, they call in all the other "less important" people to do their recordings.
Once all the voice-over's are done, the music is added, last minute touches are done and then the entire print is sent to the Certification Board to get it approved.
This was with the feature films. With sitcoms, the location is chosen, everyone assembles, and the scenes are shot. No one goes is released yet. Immediately all the actors are re-directed to a recording room where they re-act the script again by doing voice-overs then and there. Only then is the music and the occasional "background audience laugh" added. Then it goes to editing, and is sent to Certification just before it airs.