LookML works by providing a layer of abstraction between the raw data in the database and the end user. It allows data analysts to define business logic, relationships and calculations in a centralized place, which can then be used by end users to create reports and dashboards without needing to understand the underlying SQL.