Similar to how sand sinks to the bottom of a river, during the formation of the planet, when earth was still a hot ball of liquid rock and minerals; the most dense materials would make their way to the bottom, while less dense materials (like liquid rock) would "float" on the top of this growing ball of liquid metal. As iron was (and is) plentiful, and quite a dense mineral (which is why it blocks x-rays), it makes up the majority of the Earth's core. So I would say A.