Scrum is a subset of Agile. Agile is a broad philosophy or methodology in project management that emphasizes flexibility, customer feedback, and iterative progress. It does not specify how exactly these principles should be implemented.
On the other hand, Scrum is a specific implementation of Agile principles. It has clearly defined roles (Scrum Master, Product Owner, Development Team), and processes such as Sprints, Sprint Planning, Daily Scrum, Sprint Review, and Sprint Retrospective. While Agile is more of a philosophy with guiding principles, Scrum provides a specific set of rules and practices for implementing that philosophy.
This CSM Certification will help you to learn more.