Extracurricular physical activity in children and adolescents can help achieve compliance with the World Health Organization (WHO) recommendations for physical activity. The purpose of this study was to evaluate factors in school and family environments of children and adolescents in Spain that could be related to the practice of extracurricular physical activity. Multistage random cluster sampling was conducted to include 128 schools with the participation of 10,096 students between the ages of 7 and 16. Participants completed the survey of sports habits designed by the National Sports Council. The results revealed a higher participation in extracurricular sports activities among boys (OR: 1.67 (1.5–1.9)) and students in primary education (up to 12 years old) (OR: 1.8 (1.7–2.0)). Likewise, a statistically significant relationship (p < 0.005) was observed between families where another family member practiced sports and lower number of screen time hours, improved academic performance, and better self-perceived health. Participation of children and adolescents in extracurricular sports activities seems to be associated with their immediate environment. It is therefore essential to emphasize the importance of establishing physical activity habits from an early age in family and school environments.