That's an interesting question. I'm actually interested to know why you ask that question.
I don't think that any of the US military branches require certain classes in high school. In fact, sometimes recruits don't even need a high school diploma or GED, if they meet other qualifications.
Find what you enjoy, and what you don't enjoy in high school. That means trying out some things. That will help you choose what field in the Marines to target. Careers are about learning new things every day. There's hardly anyone working today that is doing the exact same thing they were doing 10 or 20 years ago, even if they have the same job.
I served in the Marine Corps Reserves for 6 years.
My best advice is:
In high school, get the best grades possible and avoid discipline issues. If you don't play sports, keep yourself in good shape by jogging, doing pushups, and gaining upper body strength. The Marine Corps is very fitness centric.
With regards to diet, eat a lot of fruit and vegetables, and don't go too heavy on fast food. Drink water and try to avoid soda.
Look for a local "poolee" program as a Sophomore or Junior in HS after consulting a recruiter.
Enjoy being in 8th Grade with your friends. The Marine Corps is a major life decision, so speak with your parents and school guidance counselor on what's best for you when you enter high school.
You will do great with any career you choose! Explore your hobbies...
You don't need specific classes to be a marine. You do have to be physically fit. The Marine Corp (as well as the Army and Navy) will train you in a specific field, called your MOS. MOS is your job type. For example, your MOS could be Rifleman, mortar crew, medic, transportation specialist, armor crewman, cook, logistics, etc. The Marine Corp will train you to do any and all of those jobs.
For High School, it would help to be good in math, geography, english and social studies as all of those backgrounds will help you in your career.