I'm new to D&D 5e and it's the first time I've played. People keep referring to the "DMG". What is it? It is a game mechanic or something else? If it is a game mechanic, what does it do?
DMG is most commonly a reference to the Dungeon Master’s Guide.
Link: Dungeon Master's Guide
It is most often used like this as a reference to a page, e.g.
You can use the rules in the Player's Handbook to create NPC's with classes and levels,...
You may also see "dmg" or "DMG" as shorthand for damage. Generally (but varying by person), lowercase is used in the D&D context. Other systems and even video games will use either version as well, lending to this confusion.
There are three rulebooks associated with the core rules of various editions of D&D. The Player's Handbook, Dungeon Master's Guide, and Monster Manual.
Their shorthand is as follows.
PHB - Player's HandBook
DMG - Dungeon Master's Guide
MM - Monster Manual
Dungeon Master's Guide
Well, everyone has already answered your specific question. I will try to make a more completionist answer so you know what you can find on it (not only "it means this").
DMG means Dungeon Master Guide, one of the core books of the D&D system, which helps DMs in their job, describing how to run your adventure, how to create your own stuff (cities, monsters, magic items) and offers some additional optional rules as guidance, for example Flanking rules and Injury rules (losing limbs, etc), which are not default in the game.
As a player, probably the only part of that book that you might need to know is the Magic Items section, so you know what the magic items you are given provide you.
If you have more doubts on abbreviations, the Adventurer's League FAQ (which can be found here, although I recommend downloading the Player Pack which has the actually updated FAQ - the one in the main page is from Season 6 as of 21/11/2018) provides a good list of common abbreviations for book names. I'm copy-pasting it here, but it gets updated as new books are released, so you know where to look for when you need it.
- PHB. Player’s Handbook
- PBR. Player’s Basic Rules
- DMBR. Dungeon Master’s Basic Rules
- DMG. Dungeon Master’s Guide
- MM. Monster Manual
- EEPC. Elemental Evil Player’s Guide
- SCAG. Sword Coast Adventurers Guide
- VGM. Volo’s Guide to Monsters
- XGE. Xanathar’s Guide to Everything
- TP. “Tortle Package”
- AL. Adventurers League
- ALPG. Adventurers League Player’s Guide
- ALDMG. Adventurers League DMG
- ToD. Tyranny of Dragons (Season 1)
- HDQ. Hoard of the Dragon Queen (Season 1)
- RoT. Rise of Tiamat (Season 1)
- EE. Elemental Evil (Season 2)
- PotA. Princes of the Apocalypse (Season 2)
- RoD. Rage of Demons (Season 3)
- OotA. Out of the Abyss (Season 3)
- CoS. Curse of Strahd (Season 4)
- SKT. Storm King’s Thunder (Season 5)
- TYP. Tales from the Yawning Portal (Season 6)
- ToA. Tomb of Annihilation (Season 7)