Herbs can be used for both. They can help prevent disease and they can be used to aid the body in healing when sick.
For general keeping the immune system up I really prefer to focus on the adrenal and thymus glands. Vitamin C is important for both. So I recommend vitamin C rich foods, such as papaya and watercress, or herbs such as amla and acerola cherry. And zinc is very important. Foods include seafoods and pumpkin seeds. For supplements adults should not exceed 50mg daily and children half of that. Remember to take zinc supplements with food to prevent nausea.
Other herbs I like generally for the immune system include astragalus, schisandra berry, and jiaogulan (gynostemma).