Used when replace or specify the appearance of data displayed by a control not the appearance of the control itself. Refer below article for reference.
 
https://www.c-sharpcorner.com/article/datatemplate-in-wpf/#:~:text=A%20data%20template%20can%20contain,appearance%20of%20the%20control%20itself.