Given the seriousness of the existing situation regarding the mental health of children and adolescents relating to the confinement period imposed due to COVID-19, we conducted this study to describe the effects of the confinement on state anxiety and executive functioning dimensions in a period of online educational modality. A sample of 953 children and adolescents was assessed. A sociodemographic questionnaire, the State Anxiety Inventory for Children (STAIC), and the Behavioral Evaluation of Executive Function (BRIEF-2) scale were applied. The analysis of the results indicates that 68.8% of children and adolescents presented medium–high levels of anxiety. Regarding sex, females showed higher levels of anxiety and worse levels of executive functioning. Although the group aged 11 to 18 years showed methodologically higher state anxiety (p = 0.041) than the group aged 6 to 10 years, the difference was not clinically relevant (δ = −0.113). The state anxiety variable was also correlated positively and significantly to the three executive functioning dimensions explored. In conclusion, it seems evident that COVID-19 lockdowns could have psychological and emotional effects on children and adolescents.