1. Deaths. We're using regular unit deaths as variables for various purposes. You modify a value of a unit that doesn't exist in your map and in another trigger you check for deaths of that unit and thus read the variable. Pretty basic stuff, no problems here right?
2. EUDs. Now someone went a step further. He abused the deaths condition to read any memory in StarCraft. (Ironically using deaths as a variable is already an abuse of their intended use.) He realized that StarCraft doesn't have error protection when using invalid player numbers and/or unit IDs in death conditions. Instead, StarCraft will read the memory that would be used to store the number of deaths of that player/unit ID if it wasn't invalid.
Also careful at this point, don't confuse "invalid unit ID" with (death of) a "unit that doesn't" exist in your map. Unit ID is a number that is assigned to each unit Blizzard integrated into StarCraft. UnitID 0 is Marine, UnitID 1 is Ghost, etc. Then there's units like cantina (probably something like UnitID 217) that got created in the engine, but were never implemented as a unit. You use those when using death counters as variables. But that's not an invalid unit ID, because there's an actual place in SC memory where the deaths of that unit are stored. Invalid IDs begin where the unused units end. Like unit ID 1000. There's just no unit that belongs to that ID, thus you can't read an actual death value for it.
Lets start from an example:
- P1 deaths of Marine. They are always stored at the same location in SC Memory. Lets say it's at bytes 1000-1003. (4 bytes = 32bit long => death values can range from -2 billion to +2 billion)
Bytes 1004-1041 store other information. - Next we look at P2 deaths of Marine which would be stored at bytes 1042-1045. Exactly 42 bytes further than for P1 Marine deaths. (Not sure on the actual increase in bytes between player numbers but it doesn't matter for this example.)
Bytes 1046-1083 store other information. - Then P3 deaths would be at 1084-1087. Exactly 84 bytes further than for P1 Marine deaths.
So using this method we can make StarCraft think it checks for deaths, but in reality SC returns the data for completely different things. Like unit facing, for example. The trick is to know what information is stored where (Farty hosts a pretty good lookup-table for this), and what combination of player number and unit ID is needed to make SC read that specific part of the memory.
Well and that's where it gets complicated. The above posters have linked you to very good articles on how to calculate the values. If you understood now how EUD triggers are working you might have a chance understanding these articles, but it's still complicated. You can't just ask for a trigger, insert it into your map and it'll work. You need to tailor them for your map and that, requires you to understand the concept, unfortunately.
I hope my elaborate step-by-step overview of EUDs has helped you a little to understand what's going on. If not, try to ask specific questions so we can give you specific answers.