Whether you have an idea or just want to have an idea, the first thing you need to do is sit down and flesh it out. Think through some of the basic concepts of your script; the world in which you want to create. Write some random phrases, maybe even a scene or two. Play them out in your head, figure out in the most basic sense what story you are looking to tell.
Now that you have your idea, next you need to decide if you want to have a story-driven or a character-driven script. The difference is, either the story defines the characters in it, or the characters define the story. If this is a story-driven script, proceed to Step 3, then onto Step 4. If you are writing a character-driven script, proceed to Step 4, then back to Step 3.
A script is based on major turning points; every movie has them. While some have more than others, every movie has pretty much the following basic precepts: an introduction period that lasts until roughly 10% into the film; a change at the 25% point that sets the tone for the rest of the film; a point-of-no-return roughly at the midpoint, a major setback at the 75% point, then the climax begins roughly at 90%. Write these figures down on a piece of paper, and decide your major turning points.
Establish your characters. Write down what you're looking for in your characters, then start to quiz them. What kinds of food do they like, what character quirks do they have, what were their childhoods like? Even if you don't plan to use these in the film, the more details you know about your characters, the better you know them, the more real they will become.
Spend some time people-watching. Sit in cafes, walk through the mall and listen to people's conversations. The trick to writing convincing dialogue is to actually write things people might say. For instance, if someone's about to be run over by a truck, they will not pull a Home Alone and scream "Oh no!" with their hands on their face. Listen to people, to get a feel not only for their word choice, but the rhythm of people's speech. The best writers have individual speech patterns and word choices for each of their characters.
Go online to the Internet Movie Script Database and download a few scripts; read them through and watch the movies as well. You will need to get a feel for the rhythm and flow of a script. However, the same basics apply to all. When you start a scene, you write a line that roughly reads, "EXT. NEW YORK CITY." Then follows the description you need to do your scene; what characters are in it, what the room looks like, what's going on. Be as brief and succinct as possible; this is not a novel, and the visuals will be created by the director. For dialogue, you center the character's name, then underneath, you write the dialogue. To write the next character's, put in a space, center the next character's name, then again, write the dialogue underneath.
Write your script. As you put your scenes together, remember that the best movies of any genre are constantly changing the feel and keeping your guessing. If you have something good happen to your characters in one scene, have something bad happen in the next. Also, you're only allowed to write scenes that have nothing to do with your central story in the first 10% of the film; anything thereafter has to somehow drive the story.