AdGuard works by filtering web pages and blocking ads and other unwanted content using various filter rules. It uses a combination of local and remote filters to provide a comprehensive ad-blocking experience.