The COVID-19 epidemic has forced the closure of educational institutions all over the globe since it put academic schedules in peril. To maintain academic activity, the majority of academic institutions have turned to online instruction platforms, which immensely affected instructors’ and pupils’ one-on-one interactions, among other things, causing a paradigm change in the teaching–learning approach. In light of this, it is essential to examine pupils’ perceptions and difficulties associated with online learning amid of the COVID-19 epidemic. The current research adopts a sample survey and a quantitative method. In February and March 2022, a sample of 369 Iraqi school pupils was collected using a Google Form Questionnaire. Several statistical methods, including descriptive statistics, factor analysis, reliability, logistic regression, and the Chi-square test, were used to analyze the data in Statistical Package for Social Science. The findings of the study indicated that, on average, students had mixed opinions toward virtual classes during the outbreak because it became a solution to fill the learning gap. On the other hand, inadequate tools and uneven access to the internet make it difficult for students to learn online. The outcome of the logistic regression analysis demonstrates that the number of rooms, family income, father’s education, and ICT device all have a favorable impact on virtual classes. Meanwhile, students confronted a lot of challenges in taking online classes. Therefore, the findings of this study will persuade academic institutions and policymakers to improve the effectiveness of online learning with the most modern teaching techniques while also encouraging the government to advance remote regions and foster basic infrastructure and Internet access, narrowing the digital divide and making e-learning more fruitful.