Hub caps are covers for unappealing wheel designs which serve very little function beyond decoration. While more aesthetically pleasing than what they cover, most have minor negative side-effects, including adding to the unsprung weight.
Performance-Oriented Hub Caps
There are some hub caps which are designed to improve performance. These tend to be flat so they make as little turbulence as possible as the air passes by them. They are also made as light as possible to reduce its contribution to the wheel's unsprung mass.
Spinners & Advertising Hub Caps
Some hub caps include a free-spinning hub of their own which allow for a decorative component to spin freely of the wheel, so that after a moving vehicle comes to a stop, the component keeps spinning, or vice versa. These are sometimes referred to as "spinners", but are often not considered "real", since they are less desirable than rim-based "spinners".
In a similar design, there are some hub caps which have the free-spinning component weighted at one end, so it is always facing one way. This is often used for advertising space, since the novelty of the design draws attention to it.
Both of these designs hinder performance, but some may consider the social benefits of them to be greater than the performance loss.
Security/Locking Hub Caps
Some hub caps are designed to make it difficult to steal the wheels from the vehicle. They can only be unlocked with a tool that the vehicle comes with, and that tool is usually found in the spare tire's changing kit.