In spite of substantial investments in science, technology, engineering, and mathematics (STEM) education, low enrollment and high attrition rate among students in these fields remain an unmitigated challenge for higher education institutions. In particular, underrepresentation of women and minority students with STEM-related college degrees replicates itself in the makeup of the workforce, adding another layer to the challenge. While most studies examine the relationship between student characteristics and their outcomes, in this study, I take a new approach to understand academic pathways as a dynamic process of student curricular experiences that influence his/her decision about subsequent course-takings and major field of the study. I leverage data mining techniques to examine the processes leading to degree completion in STEM fields. Specifically, I apply Sequential Pattern Mining and Sequential Clustering to student transcript data from a four-year university to identify frequent academic major trajectories and also the most frequent course-taking patterns in STEM fields. I also investigate whether there are any significant differences between male and female students' academic major and course-taking patterns in these fields. The findings suggest that non-STEM majoring paths are the most frequent academic pattern among students, followed by life science trajectories. Engineering and other hard science trajectories are much less frequent. The frequency of all STEM trajectories, however, declines over time as students switch to non-STEM majors. The switching rate from non-STEM to STEM fields overtime is, however, much lower. I also find that male and female students follow different academic pathways, and these gender-based differences are even more significant within STEM fields. Students' course-taking patterns also suggest that taking engineering and computer science courses is predominantly a male course-taking behavior, while females are more likely to pursue academic pathways in life science. I also find that STEM introductory courses - particularly Calculus I, Calculus II and Chemistry I -- are gateway courses, that serve as potential barriers to pursuing degrees in STEM-related fields for a large number of students who showed an initial interest in STEM courses. Female students were more likely to switch to non-STEM fields after taking these courses, while male students were more likely to drop out of college overall. In addition to the study's findings on students' academic pathways toward attaining a college degree in a STEM-related field, this study also shows how data mining techniques that leverage data about the sequence of courses students take can be used by higher education leaders and researchers to better understand students' academic progress and explore how students navigate and interact with college curriculum. In particular, this study demonstrates how these analytic approaches might be used to design and structure more effective course taking pathways and develop interventions to improve student retention in STEM fields.