Volunteering: enough that you experience some form of personal growth and convince adcoms that you have some degree of altruism. Medicine is not an easy or forgiving life path. It requires a lot of self-sacrifice. The "altruism" behind volunteering is just a taste of what's to come. If you find you really hate volunteering, medicine might not be the best path for you.
Research: hours are not a meaningful measurement. What did you learn? What did you do? What did you discover? What did you produce? Who did you work with on a professional level and how did all parties benefit from that relationship? These are the questions you should be asking, now "how many hours"
Shadowing: Do enough that you have a decent idea of what a doctor does on a day-to-day basis and can convince adcoms that it's something you want to do for the rest of your life. Some people can be as convincing with 20 hours as others can be with 100 hours, but the more hours you have, the more "experience" you have to back up your claims and the more likely adcoms are to believe you.