Great question. Also very cool to see someone interested in both AI/computer science and humanitarian work. This is an area I'm also very passionate about and am actively working on several different projects. There is no well defined path but there are many opportunities and ways to break in.
If you are still in college, I'd highly recommend either minoring, double majoring, or taking elective classes in political science and sociology. This should be in addition to you computer science and math courses. Be sure to take a social science quantitative and qualitative methods class that teaches you how to undertake social science research. In order to tackle real world humanitarian and social problems, it's important to understand the social and political dimensions, instituions, and social dynamics. Most foreign service organization, NGOs, and non-profits operate in areas with storied histories and layered social dimensions. Whether you're building technologies, analyzing data, or just intervening generally, you'll want to have a vocabulary and set of social science tools to better understand the situations you're entering and impacting.
The next thing I'd recommend to reading case studies and better understanding the vast challenges and problems that exist. There's work in poverty reduction , public health, conflict prevention, social justice and many other spaces. Try to learn about all of them superficially and identify what your advocacy area is that you want to dive deeper into. For example, if you're interested in malaria prevention (one of the key causes at the Bill and Melinda Gates Foundation), try to read more about the different challenges they face and identify where technology and data can be valuable. Next see if you can volunteer or intern an NGO or nonprofit that's aligned with your advocacy area.
Finally, get as much hands on experience writing code and building models as possible. As others have mentioned there's Kaggle. Also check out drivendata for Kaggle style competitions for social good.
Another option is check out the Data Science for Social Good summer program at University of Chicago. I've included several other resources below to checkout.
Hopefully this will get you started. Feel free to post more questions and best of luck. There's a lot of work to be done in this space and it fantastic to see passionate students like yourself getting involved and seeking to make a difference.