Dennis,
Dashboard cameras. OK, you asked a serious question, but I couldn't resist. The real answer is that it comes down to an array of radars, and lots of computing power at Space Command, or other similar agencies. Ordinary launches are fairly obvious, as are the "dropped" gloves, tool kits, washers, etc from the ISS or other such operations. They track these, and can predict close approaches very accurately. We get close approach warnings periodically for AMSAT spacecraft.
In this case, it was the remains of a weapons test. That is a lot messier. All the debris radiates outward from the initial impact/explosion, and there are often large numbers of them. The source can be identified since the debris can be projected/calculated backward in time to the initial point. After that, it is just a matter of continuous updates over the years.
73s,
Alan WA4SCA