Themes and theming can be used to give another look and feel to existing UI and has a close relation to templating.
A theme is nothing more than a blueprint for the layout of various elements be they UI components in a windows application, image and gradients in web applications or 'default' code added to code files.