Throughout the Iron Man franchise, tony stark uses an arc reactor to stop shrapnel from piercing his heart, but how is this done. Well to begin with, when yinsen attach a magnet tostark's chest to use the laws of magnetism. By having the electromagnet facing the south side, it allowed the shrapnel to stop moving towards his heart and move still facing the magnet. Even still when stark made an upgraded arc reactor and told pepper to help him fix it into his chest. When pepper removed the magnet while trying the shrapnel continued its course. However when she put the new reactor in, it acted as an amplified magnet by completely stopping the shrapnel while still being mobile.