A screenplay or script is a blueprint for producing a motion picture. It can be adapted from a previous work or an original work in and of itself; every year, the Academy of Motion Picture Arts and Sciences hands out Oscarss in both Original Screenplay and Adapted Screenplay categories.
A script for a television program is sometimes called a teleplay.
Someone who writes screenplays is a screenwriter.
Screenplays for feature films are generally about 90-120 pages long, with the general guideline being that each page is about one minute of screentime. American screenplays are printed on three-hole-punched paper, and held together with an industry standard of not three but two brass brads.
Screenplays can be written either on "spec" or as assignments. Assignments are commissioned by production companies or studios. Spec scripts are written independently by screenwriters in hopes of selling them to producers or studios. Sample scripts are not (usually) intended for production, but to showcase the writing skills of the screenwriter, in hopes of coaxing an agent to represent the screenwriter or a producer to hire the writer. Once a studio has purchased a script, it goes through the process of revisions known as development hell until all stakeholders are satisfied and ready to proceed. A shooting script is a version of a script from which a movie is actually shot, which contains that includes scene numbers, camera angles and certain directors' notes--it is generally fiercely marked up by the script supervisor and other production workers, while the writer's draft is simply the skeleton around which the production is built.
A screenplay is different from a transcript. A transcript is simply a copy of what dialogue finally appeared onscreen, without regard to the original script, the stage directions or action. Transcripts and screenplays can differ significantly.