Movies will generally have a very long script that has been redacted time and time again, and that has been handed out to the actors to be studied and rehearsed, so they know exactly what they’re doing and saying during the filming process.
However, this doesn’t mean that actors in movies never improvise. In fact, there is a lot of improvisation in movies, as actors will be re-filming the same scenes over and over, and will occasionally change them up with some improvised line or action, to see if it works or if it adds any difference to the scene as a whole.
Sometimes, the director will even instruct the actors to forget about the script and to improvise within a scene, to get a feel of the story and characters, and to come up with new ideas.
Other times, actors will randomly improvise, sometimes out of a mistake or because of a certain circumstance, and the improvised scene will be the one that makes it into the final cut of the film!
Movies are a long process, so actors get plenty of chances to improvise and maybe give their input on the script itself. Although it is far easier to improvise in live performances, as there is no re-filming to be done then!