An element entails an entity which is purely made up of one single atom. In the examples you have given us, carbon would be an element as it is purely made up of carbon atoms.
A compound is something which contains more than one atom, but what sets it apart from a mixture is that a compound can be split into its atoms using physical methods, where as to split the atoms in a mixture, most often than not, chemical methods are applied.
A compound then in your case would be, sand in water. A mixture would be soil.