The most widely accepted model for the planets around PSR B1257+12 is that they were a result of two white dwarfs merging. The white dwarfs would be in a binary orbit, with the orbit slowly decaying until the lighter white dwarf star filled its Roche lobe. If the mass ratio is large, the lighter companion would be disrupted, forming a disk around the more massive companion. The star would accrete this material, and would result in its mass increasing until it reaches the Chandrasekhar limit, in which it would experience core collapse and turn into a rapidly rotating neutron star, or, to be precise, a pulsar. After the explosion, the disk around the pulsar would still be massive enough (about 0.1 ) to form planets, which would likely be terrestrial, due to them being composed of white dwarf material such as carbon and oxygen.
