Physics, as a discipline, has long struggled with pervasive stereotypes and biases about who is capable and can excel in it. Physics also ranks among the least diverse among all science, technology, engineering, and mathematics (STEM) disciplines, often cultivating and fostering learning environments that lack inclusivity and equity. Moreover, stereotypes about brilliance, inequitable physics learning environments and the overall physics culture not only impact the experiences and outcomes of students who major in physics, but also those from other STEM disciplines who must take physics courses. Here we undertake a narrative review, delving into research concerning diversity, equity, and inclusion within undergraduate physics education. We concentrate on the experiences of women and persons excluded due to their ethnicity or race (PEERs) in physics, aiming to shed light on the alarming current situation. The review begins with a few concrete examples of exclusionary experiences that research shows are common for women in physics and can reduce their interest or motivation to pursue a physics major. Then, we provide our conceptualization of equity in physics learning environments and describe the frameworks informing the perspective taken in the review. We then discuss issues related to inequities in physics learning environments, including but not limited to inequities in academic performance, participation, and persistence in physics, as well as psychological factors such as physics self-efficacy, perceived recognition, social belonging, mindset beliefs, and others. We also review research on factors commonly associated with the lack of diversity, equity, and inclusion in physics including the lack of role models, stereotypes associating physics with brilliance, and the overall prototypical culture of physics. We emphasize that addressing these systemic issues in physics requires a holistic approach. We conclude with a list of recommendations for physics departments and instructors on how they can play an important role in transforming the physics culture and making the learning environments equitable and inclusive so that all students can engage in learning physics and enjoy it while feeling supported.