When buying fresh spinach, look for the leaves to be uniformly deep green, not yellowish at all, crisp and fresh smelling. Unless you have no choice, don't buy pre-packaged in cellophane spinach. It is old and tough already by the time it hits the supermarket. Buy the loose leafed spinach you yourself put into the plastic bag. It's the only way you will know what you are getting, short of growing it yourself.
Spinach is extremely perishable and is best cooked within a few days of purchase.
The proper cleaning of spinach is very important. Do not rinse it as if it were lettuce. Do not scrub it as if it were a potato. Fill your kitchen sink with water. Take the whole head of spinach leaves in one hand.