Hotjar works by tracking user behavior on your website. It records user clicks, taps, and mouse movements, as well as how far down the page they scroll. It also collects feedback from users through surveys, polls, and forms. All of this data is then analyzed to give you insights into how to improve your website's user experience.