how do rocks differ from minerals