Remove old nails when replacing roof?
You want a flat smooth surface when reapplying felt/shingles. All of the old roofing nails should be pulled out/banged in. If the old shingles were lifting up there are numerous things that could have caused that. After removing the old shingles you need to make sure that the plywood/boards are in good shape. If there is any rot it needs to be replaced or else the roofing nails won't hold and will pull up. It is possible that the old nails were too short and that is why they pulled up. Pulling the nails is far from impossible, nothing a claw hammer, or catspaw can't take care of. If you have a steep pitched roof I never recommend this as a DIY job though, better to leave it to the professionals who walk those roofs on a daily basis.