Themes are used to define a particular look and feel for Confluence. Use themes if you want to add a new functionality or to significantly alter the appearance of Confluence. Themes can be applied to the whole site or to an individual space.
Creating a theme consists of two steps:
To install it within Confluence, please read Installing and Configuring Plugins.
There are also example themes for you to learn from and extend.
You may also want to read Including Cascading Stylesheets in Themes