The main way of losing nutrients due to cooking is through boiling, and then throwing away the water. The heat causes many nutrients to leach into the water, at which point they will be lost if the water is not used. Other methods are usually not as damaging, although less heat for less time is better.
In general, foods should be stored away from heat, light, air, and humidity, and used as soon as possible.