Foster was born in Culver City, California. Her parents, Warren and Frances Foster, worked at IBM and San Diego State University. Foster has said that he was always encouraged to work hard, and she eventually attended the Helix High School. She has said that she enjoyed baking as a child, primarily because of how much chemistry it involved. Whilst still a teenager, Foster was awarded a NASA women in science fellowship. Foster attended Spelman College, which she graduated in 1992. As a student at Spelman, Foster took classes in environmental chemistry, and decided that this was a research area she would like to pursue. She moved to the University of Colorado Boulder for her graduate studies, where she specialised in hydrogen halides. In 1998 she moved back to California, joining University of California, Irvine as a postdoctoral researcher, where she worked alongside Barbara J. Finlayson-Pitts. Here her work made use of mass spectrometry to investigate sea salt particles.