What is the difference between the Starter Set I can buy from my local store and the free Basic Rules I can get for free from the Wizards website?
There are some basic differences that are both important and unimportant:
The basic game does not contain pregenerated characters or adventures. The starter set does.
The starter set does not contain character creation rules, full spell lists or advancement past L5 for it's pregenerated characters, the basic rules online do contain this information.
the starter set has a limited version of the rules, and only contains the monsters necessary for the adventure, the basic rules have a much wider bestiary, more magic items and a complete set of the rules.
The starter set is intended to be a quick introduction to D&D, to which you can later add the basic D&D rules online as you need more rules for more situations and advance past L5 (which is when the starter set ends).
If you want more options beyond the basic rules (for character creation, monsters or rules), the printed books provide this information.
As Mike Mearls explained in Legends & Lore, the Basic Rules for Dungeons & Dragons is a PDF (over 100 pages, in fact) that covers the core of the game. It runs from levels 1 to 20 and covers the cleric, fighter, rogue, and wizard, presenting what we view as the essential subclass for each. It also provides the dwarf, elf, halfling, and human as race options; in addition, the rules contain 120 spells, 5 backgrounds, and character sheets.
- 64-page adventure book with everything the Dungeon Master needs to get started
- 32-page rulebook for playing characters level 1–5
- pre-generated characters, with character sheet
- 6 dice
As an experienced D&D player I started 5th Edition with the basic rules. That gave me the opportunity to see mayor changes to prior editions and to actual see how those rule changes effect actual play. In my eyes the starter set is for people that play or GM D&D the first time. So the entry barrier to get a first game is lower as character creation and adventure design are already done.
The Starter Set's biggest difference is that it is mainly an adventure, including pre-generated characters so that a group can start playing almost immediately. It does include a rulebook, but only enough rules to play the included adventure and get a feel for how the game works. Most importantly, it does not include rules for creating characters, or for advancing characters other than the pre-generated ones (and even then, only a few levels' worth).
The Basic Rules PDFs, by contrast, gives you rules that are complete enough that you can play an entire campaign from 1st through 20th level. The options are more than in the rules in the Starter Set, but more limited than the full books. The Basic Rules don't include an adventure or pre-generated characters.