It's a consequence of signing bonuses and the salary cap maths. Due to the non-guaranteed nature of contracts, NFL contracts are split into two parts: an annual salary, payable if the player is on the roster that year, and a "signing bonus" which is paid up front. For example, a 5 year, $15 million contract could be broken up as a $2 million annual salary and a $5 million signing bonus. For cap purposes, the diggingsigning bonus is prorated over the length of the contract, so that $15 million contract would have an annual cap charge of $3 million as you might expect.
The complication comes if a team decides to cut a player - in that case, the annual salary comes off the books, but whatever hasn't already been accounted from the signing bonus counts against the cap in that year. For example, if the team decided to cut our $15M player just before the fourth year of his contract, the "cap charge" for that player would be $2M for the bits of the signing bonus that got prorated into years 4 and 5 of the contract. However, they get nothing for that $2M (because they've cut the player!) hence "dead money".