Those "nails,"as you call them are not really nails at all. They are called "snap ties," and are used to tie the inside and outside wall forms a set distance apart until the concrete has been poured and hardens. The heads you see are meant to be snapped off after the forms are removed. It's been a long time, but I think you only need to bend the head back and forth a time or two with a hammer and they'll break off.