How does a highschool student intern under a professor? I have read that interning under a professor can not only help you gain a better understanding of a subject but also it can look good on your college resume. I was wondering how I could possibly do this in ninth grade. Do I email the professor I want to research under or does he have to ask me or can it be both?
Your goals are laudable and do not be discouraged by naysayers who say high schoolers should not get research experience. I had research experience in high school working with biologists at an army base and National Wildlife Refuge when I was in high school.  

Now, to answer your question. The short answer is do legwork and research nearby universities. Here are examples I know about:


Some universities have formal outreach programs for high school students such as this archaeologist program.
Some professor will take high school students as interns. For example, my advisor lists his high school interns on his CV. Note that CV is basically an academic resume.


Here are suggestions for finding these opportunities: 


Try to find a "mentor" who is doing research. Ask them for an informational interview. This could be someone who works as a scientist or maybe one of our high school science teachers. You probably know someone who knows a scientist even if your personally do not. Ask your parents, high school teachers, family friends, scout leaders, people from church, etc. if they know anyone. Basically, tell them "I think I want to be a scientist. Do you know anyone who is one 
that I could ask about their job?" Do not hound this person about their job or expect to get an internship with them. Instead, ask them how they would get an internship if they were in your shoes. 
Browse and search homepages of universities and their academic departments and faculty. This will let you see what type of research exists at the school and might help 
Look at the "Continuing education" or "public outreach" or similar programs such as Upward Bound.
Expand your search beyond universities. Look for internships at nearby industries or government facilities (e.g., government labs, state parks, wildlife reservoirs, fisheries centers, etc). All of these places employ scientists including chemists, geneticists, biologists, ecologists, and more. 


Note in case you live in a rural area: Even if you are in a rural area or small town, people do research. You county likely has an extension agent (For example, Wisconsin has UW-Extension and your state if in the US likely has one too). Some people wrongly think of farmers as backwards people, but they are wrong. Modern farming uses lots of science. In addition to extension, look to ag for other scientific applications such as genetics and self driving cars. These companies have representation in rural areas. Even if you do not want to study these fields, seeing what they do would still help you to better understand research.