Going by the comics origin, Stark's heart was threatened by a piece of shrapnel that remained embedded in his flesh, and would kill him if it were ever drawn into his heart. The device is an electromagnet that keeps the shrapnel away from his heart.
In the comics, Tony eventually had surgery (many, many years later) to correct the problem, meaning he no longer depended on the device to keep him alive. It was still important as the power source for the Iron Man armors he built, however.