In this talk I will present how a rule engine in general and Drools in particular work. After a quick introduction showing the main differences between imperative and declarative programming and describing the most common use cases when the second should be used or at least considered, I will delve in more details into how this concepts have been implemented in Drools and which are its characteristic features including: the Drools Rule Language, the possibility to combine forward and backward chaining, the Truth Management System and the temporal reasoning capabilities (Complex Events Processing). Finally I will illustrate the new features added to the version 7 of Drools including: the new multithreaded version of the rule engine; the new OOPath syntax to ease the navigation of graph of objects inside the working memory; the Rule Units that allow to partition a rules set into smaller units, binding different data sources to those units and orchestrate the execution of the individual unit; the executable model that provides a pure Java-based representation of a rule set, together with a convenient Java DSL to programmatically create such model.