The removal of iron nails from a pile of dust can be achieved by the process of
Decantation
A magnet can be used to separate iron nails from sand, as iron nails get attracted towards the magnet whereas the sand remains as such. This process is called as magnetic separation.