Iron is a magnetic substance which is attracted by magnetic field. In a mixture, the properties of elements are retained. When a mixture of iron filling and sulfur are present, iron can be attracted towards a magnet. When the mixture of iron and sulfur is heated, iron reacts chemically with sulfur to form a new compound iron sulfide. Iron sulfide does not retain the properties of individual elements iron and sulfur. So, the mixture of iron and sulfur after heating will no longer be attracted towards a magnet as a new compound iron sulfide will be formed.