Regular expressions (regex) use metacharacters to form patterns for string matching. The basic regex structure includes character classes, quantifiers, and alternation/grouping. In Java, the Pattern class compiles a regex string into a pattern object, and Matcher finds matches in input. Matcher methods like start(), end(), and group() retrieve match details. Regex strings in Java require escaping metacharacters with a backslash to avoid compiler errors.