Dry ice releases carbon dioxide when it melts so you better not work in an area where there are no ventilation because you can be suffocated. It can explode as well and can cause a lot of health issues if not contained in an insulated container so better watch it before moving on.
Heat the area of the dent with any method you like but make sure that when you apply the dry ice to the dent, it is well warm otherwise your whole time will be wasted and you will reap no positive results. You can use sunlight for heating purposes as well.
Dry ice can easily freeze your skin so don’t make a fool of yourself by not wearing cotton gloves and always keep a towel to handle the piece of dry ice.
When the dent is heated, cool it by applying the dry ice and it will slowly ‘pop up’ the damage to its original location and your car will give the old look.