DnD 5e - Books and Other Source Material
Dungeons and Dragons is published primarily as a series of books, but other source materials exist.
The Core Rulebooks
The Core Rulebooks are the three most important sourcebooks available. They contain the core rules of the game which you need to play Dungeons and Dragons. This guide will frequently provide page references to parts of these books where you can find additional information, or where you can find the original text of rules which I am referencing but which I am not legally allowed to reproduce.
The Player's Handbook details the most important rules of the game, including such crucial content as how to build a character, how combat works, and how magic works.
The Monster Manual contains a library of creatures for the Dungeon Master to use in the game. Some will be vicious enemies, some will be unexpected friends, and some will simply be wild beasts that you encounter on your adventures. The Monster Manual contains some of the world's most iconic fantasy monsters like goblins, griffons, and sphinxes, but it also contains the most iconic monster in Dungeons and Dragons, including Beholders, Dragons, and Mind Flayers.
The Dungeon Master's Guide provides additional rules which the Dungeon Master uses to run a campaign, but it also contains rules for traveling between planes of existence, magic items, and other rules which the player's don't absolutely need to play the game, and which might be intimidating for new players reading the rules for the first time. Despite the name, the Dungeon Master's Guide is not some secret tome exclusively for Dungeon Masters. While it contains content primarily for Dungeon Masters, I strongly encourage players to read it too. Understanding what your Dungeon Master is doing behind the scenes can make you a much better player, and the Dungeon Master's Guide contains great things like magic items.
If you never buy another Dungeons and Dragons sourcebook, you'll be fine with the core rules. They contain enough content to last a lifetime.
The Starter Set and the Essentials Kit
The 5th edition Dungeons and Dragons Starter Set is a fantastic resource for new players first learning the game. It contains 5 pre-generated characters and an adventure which will take the players from 1st level through 4th level, and many of the official published adventures can be started immediately after completing the starter set adventure, "Lost Mines of Phandelver".
Lost Mines of Phandelver is a fantastic introductory adventure. It's fun, well designed, contains interesting characters and items, and it's a great introduction to the themes and tropes of Dungeons and Dragons.
If you're not ready to buy the core rulebooks, the Starter Set is a fantastic and inexpensive way to get started. The adventure is long enough that it will take between 4 and 8 game sessions to complete, depending on how long you play during each session.
The "Essentials Kit" is a recent addition to the product lineup, and it's a successor to the Starter Set. Like the Starter Set, it contains pre-generated characters and a published adventure, but this time the adventure takes the players all the way to 6th level. Unfortunately I have yet to read the adventure, so I can't speak to its merits.
The Basic Rules
The Basic Rules are a simplified version of the core rules which Wizards of the Coast provides for free as a pair of PDF documents. The rules contain a dramatically reduced set of races and classes for player characters, and other content like spells have been reduced to the most iconic and essential options.
The System Reference Document
The System Reference Document, or "SRD", is officially a reference document for use by third-party publishers. It grants third-party content creators significant leeway to reference, use, and even reproduce large sections of the core rules. It also contains all of the race options from the Player's Handbook and all of the classes with a single subclass each. In effect, it's a larger content set then the Basic Rules, but it's also not organized for teaching players how to play the game.
A great deal of content from the SRD is reproduced in this guide. In some cases I reword or expand this content, and in a few cases it's simply duplicated wholesale. This is one of the beautiful things that the SRD allows, and I'm very happy that I get to do this.
Over time, Wizards of the Coast has published (and hopefully will cotninue to publish) new sourcebooks which expand upon the core rules. These sourcebooks add new monsters, new player options like races and subclasses, new spells, and in some cases new or expanded rule systems.
If you're looking for your first rule supplement beyond the core rulebooks, get Xanathar's Guide to Everything. It contains a number of truly fantastic expansions to the core rules which improve parts of the core rules that needed expansion for one reason or another.
In addition to sourcebooks, there are also official published adventures like Storm King's Thunder, Elemental Evil, and Princes of the Apocalypse. Published adventures are great for DMs who don't like to write their own adventures or don't have time to do so, and they're a great way for new DMs to get comfortable in the role before trying their hand at writing their own adventures.