Improving the digital competences of teachers, students, and schools contributes to achieving Sustainable Development Goal 4 of the 2030 Agenda. That goal consists in enhancing the quality of education and offering learning opportunities. The knowledge of digital resources that teachers had and used during the COVID-19 confinement has contributed to the current awareness of the need to improve teachers’ digital competence. The main objective of this paper is to analyse the digital resources that teachers participating in this research used the most in Spain between March and June 2020 due to the lockdown experienced in that country. A validated questionnaire, which was administered online in schools and high schools of the Community of Madrid, was answered by 97 teachers who were able to teach from home. The results reveal their assessment of the technological resources they used. In their opinion, the most useful were digital platforms, online classes, and videos, whereas the least useful were online tests and forums. Their answers also show that the training they received was mainly through Internet tutorials and consultations with colleagues. In order to ensure quality education, it is important to improve teachers’ digital competence as a part of their training.