Named because of their semblance to actual ID tags worn by dogs and other pets, dog tags are required for all soldiers. Most often soldiers are given two identical tags to be worn at the same time. This allows one of the tags to be collected should the wearer be killed or severely injured and unable to be recovered from the battlefield immediately.
In games, dog tags have been featured in titles like Metal Gear Solid 2. Every enemy soldier had a tag that could be collected through holding the soldier up. Collecting the tags unlocked special bonuses like unlimited ammo and oxygen.
It should also be noted that variants of dog tags appear in several games, most notably the Gears of War series, which features "Cog tags", similar to dog tags and when collected, they unlock achievements.