If you're interested in how the inner workings of this query system works, take a look at SICP Section 4.4.4. While this material is very interesting, you are not responsible for knowing the implementation of the query system for this class.