In order to get all the nutrients our bodies need, we need to start with that old phrase, "a well-balanced diet." Again, people argue about how much protein, fat, and carbs we're supposed to get; they argue over eating meat or not; and all the rest. I'm not about to prescribe any particular diet, but leave that in your hands.
Regardless of what diet you choose, you should eat a wide variety of healthy foods (i.e., ice cream is not the healthiest choice among dairy products; to a degree, we can just use common sense) in order to expand the number of vitamins, minerals, and other nutrients you're getting into your body.
The supporting option for getting nutrients is of course the very popular choice of taking nutritional supplements. As long as you use these to support a balanced diet rather than to replace it, these can be most useful because:
A) Today's soil is depleted of much of its former nutrient content, so even a healthy diet consists of fewer nutrients than it once did.
B) We're dealing with plenty of environmental factors that people didn't face once upon a time, and I believe that extra nutrients can combat the added strain on our bodies.
C) Even as we shoot for the ideal diet, few of us really achieve that. Because nutrients play such a key role in keeping us in good shape and preventing physical illness (malfunction of the body), I believe that supplements can be one of the best long-term investments you can make in yourself.