A compound is only formed when two or more elements will chemically react with each other on mixing them together. In case the conditions to undergo a chemical reaction are not suitable, the elements will mix with each other to form a mixture.
Example :
Fe + S FeS
Iron Sulphur Iron sulphide