Okay, I really couldn't think of a catchy title to fully describe the extent of the power of WPF Templates. So I just said "Styles and Triggers on Steroids".
Templates in WPF allow you to fully change the UI of anything in WPF. In WPF, Templates inherit from an Abstract base class called "FrameworkTemplate". This is shown as below -
As you can tell from the above figure, there are 4 kinds of Templates available within WPF.
1. ControlTemplate - You use this, when you want to completely redefine the visual appearance of any control. Say, you don't want a radiobutton to look like a radiobutton - you want it to look like a smiley instead. Smiling means Checked, and Frowning means Unchecked. You could easily acheive this using ControlTemplate.
2. ItemsPanelTemplate - Is a rather simple kind of template, it lets you control the appearance of the "ItemsPanel" property defined by "ItemsControl" on elements such as ListBox or ComboBox.
3. DataTemplate - is probably the most common kind of template you will use. It lets you change how "Content" is rendered on any control. So if you have an object called "Customer" and you want to define a standard look and feel for "Customer" - you'd use DataTemplate.
3.a. HierarchicalDataTemplate - is a class that is a DataTemplate that is very well suited to hierarchical data.