A regular expression is converted into code executed in a virtual machine. This virtual machine runs on the virtual machine of the host language or editor.
Abstract models are helpful for understanding how regular expressions are executed. Although these models often neglect optimization techniques implemented by regex engines, they still give you valuable information on how regexes work.