If I have a herniated disk, what exercises can I do?

Depends. Depends on if you are in the acute phase of injury. Once you're past the acute muscle spasm working on core strength - abs and back- will be important. Work with your doc or physical therapist to get a home exercise program and learn how to do the exercises correctly. You don't want to hurt yourself. But you should be able to return to full activity.
Most . Most exercises are good but certain ones should be avoided until you are free of symptoms like rowing and certain types of weight lifting. Even running may hurt in certain instances but then you can cross train. Core exercises are good as are cardiovascular ones but you can learn these from a physical therapist or by a spine specialist . If in no pain, regular exercise minimizes recurrence risk.