With the world becoming increasingly digitalized, ICT has a key role to play in the educational process. The aim of this research is to determine the personal characteristics of teachers, as well as those of the school and class environment, that make them more likely to use ICT in their classes. This research is especially interesting given that there is little pre-existing literature in this regard. For this purpose, we estimate a logistic model with data from the census survey for the Community of Madrid (2016-2017 academic year) of the individualized evaluation of students in the final evaluation of their fourth year of Compulsory Secondary Education for four different competences: Mathematics, social and civic competence, English and Spanish. Our results suggest that higher teacher motivation, greater use of ICT by students in school and at home and better-prepared teachers who require less ICT training is associated with more frequent use of ICT in the classroom in all four subjects. However, some of the determinants of the use of ICT differ according to the competence evaluated. Teachers working full time use ICT more frequently in the classroom, but only in Spanish and Mathematics. On the other hand, teachers with greater disruption of order in their class use ICT less frequently in social and civic competence and English. We also find that a lack of digital devices in the school is associated with lower uses of ICT in English, Spanish and Mathematics but is associated with a higher use in social and civic competence. Finally, we also find that private and semiprivate schools use more ICT than public schools in Mathematics, English and Spanish.