Mod_rewrite is an Apache module that allows flexible and powerful URL rewriting. It uses rule-based parsing of URLs with conditions that can check server variables, headers, timestamps and databases. Rules are processed in the order defined, with patterns matched against the URL and substitutions to rewrite the URL. Conditions are checked before rules are applied, allowing complex rewrite scenarios.