Class size can affect learning by influencing the amount of individual attention each student receives from the teacher. Smaller class sizes generally allow for more personalized instruction and support, which can lead to better academic outcomes. In larger classes, students may have less opportunity for one-on-one interaction with the teacher and may struggle to stay engaged and focused.