Time was, it was difficult for anyone outside of Hollywood to lay their hands on legit screenplays; then, with the birth of the internet, scripts were everywhere, but with the proliferation of screenplays came an equal divergence in quality: some were just plain inaccurate, while others were early drafts that were discarded long before cameras started rolling. We've featured tons of screenplays here before, but this is a real embarrassment of riches, courtesy of Go Into The Story.
The best way to learn how to write a script is to read as many scripts as you can, in as many formats as you can. As a beginning screenwriter, odds are you're going to be writing a lot of spec scripts (short for "speculation," or, in other words, free); if the spec script is sold, and manages to make it to production, then you'll end up with a shooting script (which has been broken down by the script supervisor) and feature lots of details like CUT TO:, POV, and CAMERA ANGLES. This is the draft the crew uses to make the movie. You'll find both types in this collection, and this guide from the Academy of Motion Picture Arts and Sciences should be helpful.
Source: Go Into The Story