A pure state of a system is always defined with respect to a physical observable. It is defined to be a state where measurement of the observable always yields the same result.
Such a state may be prepared by first measuring the observable and then maintaining only these systems in the experiment which yield a particular result. The state of the systems we keep, immediately after the sorting process and before any internal or external influences have a chance to have an effect, will be pure and always give back the same value if the observable is measured again.