In Angular, pipes transform data in templates. Pure pipes run only when their input changes, so Angular caches their output and skips running them if inputs are the same. This improves performance by avoiding unnecessary work. Impure pipes run every change detection cycle regardless of input changes, which can slow down the app. The example pipe converts text to uppercase and logs when it runs. On initial render, the pipe runs and logs. On subsequent renders with the same input, the pipe does not run and uses cached output. When input changes, the pipe runs again. Impure pipes run every time, even if input is unchanged. Understanding this helps write efficient Angular apps.