Start with an idea you love. Every script is based on one solid idea that is the seed of the entire project. It can be something as simple as "boy falls for girl; girl falls for other boy," or as wacky as "what if a man got stuck in a malfunctioning time machine?" Whatever your idea, you must be ready to commit to it 100 percent, and for the long haul. Writing a script, contrary to Hollywood stories and gossip, is not something that is often done in a weekend or even a week. It is a painstaking process that requires a great deal of work, reworking, rewriting and dissection. Therefore, make sure that the idea you choose is one that you feel strongly about. Otherwise, halfway through the process you will become bored and the script will fail.
Create a basic three-act structure for your plot idea. This is not the time for details; this is the time for painting in broad strokes. The basic structure you need to form at this point is the inciting incident (the event that happens at the beginning of the movie that sets the story into motion), the first act climax, the second act struggle, the second act climax and the crisis/climax of the third act. Think about your protagonist and antagonist and how you can heighten the conflict between them with each progressive climax. Every obstacle must be greater and harder to overcome than the last. Also, every climax must give the audience something that the protagonist must deal with that they were not expecting, throwing the story into an interesting direction that they didn't see coming. Finally, the crisis/climax of the final act must resolve, in some way, the basic conflict presented at the beginning of the movie between the protagonist and antagonist.
Write a detailed outline. Take your three-act construct now and flesh it out into a scene by scene outline of the movie. For each part of the outline, detail who is in each scene, where each scene takes place and how the value charge in each scene changes from the beginning of the scene to the end. That is to say, there should never be a scene in your movie where your protagonist does not have a change of status in some way from the beginning of the scene to the end. It can be something as simple as the protagonist starts this scene filled with hope, and at the end is full of fear. Every scene must move the plot forward, so there can be no scene that serves as merely exposition. Weave any exposition that is needed into scenes that move the plot forward.
Build a full treatment. Once you have your detailed outline for your movie, use this detailed map to write a full treatment. A treatment is basically the entire script of your movie, without the dialogue. The dialogue should always be written last. Movies are a visual medium, and your treatment should be written with that in mind. As you write out your treatment, make it as detailed as you possibly can. This is where we begin to see the nuances of characters, and where the supporting characters begin to emerge in three dimensions. You will want to write dialogue for your characters at this point. Resist the urge, because once you have detailed their physical actions and the visuals of their world, you will be much better informed afterward to put words in their mouths. It is after, and only after, you have written the full treatment, that you are ready to write your script.